Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Backup using Rsync, Bash & Cron

  1. #11
    Join Date
    Oct 2005
    Beans
    120

    Re: Backup using Rsync, Bash & Cron

    Great tutorial! I had an assignment for Linux Admin. class in which we were to find a script and cron job on the internet, summarize it and reference it. This worked so well that I used it for my assignment. Since your real name isn't listed I used your pseudonym for the reference citation.

    I thought I read in one of my classes though that this could be done using tar so that it was compressed and still only backup new and changed files like rsync does. Do you know if there's a way to do that or is one of my cylinders not fireing right? (it wouldn't be the first time that happend LOL).

    Rob
    Rob
    Ubuntu 11.04 x64 1.5GB HT.
    Radeon X300.

  2. #12
    Join Date
    May 2009
    Location
    Lancaster, PA
    Beans
    1,334
    Distro
    Ubuntu Development Release

    Re: Backup using Rsync, Bash & Cron

    Quote Originally Posted by DanneUK View Post
    I wanted to backup my home directory using rsync to a separate drive, and to make it happen automatically.

    I spent ages ........
    And you're done!


    This article was first published by me at The Linux Basement and is licensed under the Creative Commons Attribution-Non-Commercial 3.0 License


    Hey! Great job! very helpful!

    I have one suggestion, rather than use "/home/your-username/Desktop/" Why dont you edit the code so that it reads, "/home/$USER/Desktop/...." That way, no one has to change the code for their specific computer, they just copy and paste away!

    Keep up the great work!
    Last edited by tom.swartz07; March 28th, 2010 at 08:25 PM.
    Java Guide Media support Flash x64 Grub2 Get Dropbox! My Look! RSync Twitter

    "Windows 7 was my idea"- I guess Microsoft enjoys copyright infringement?

  3. #13
    Join Date
    Oct 2005
    Location
    Oregon
    Beans
    97
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Backup using Rsync, Bash & Cron

    Quote Originally Posted by tom.swartz07 View Post
    I have one suggestion, rather than use "/home/your-username/Desktop/" Why dont you edit the code so that it reads, "/home/$USER/Desktop/...." That way, no one has to change the code for their specific computer, they just copy and paste away!
    Or better, use
    Code:
    $HOME

  4. #14
    Join Date
    May 2009
    Location
    Lancaster, PA
    Beans
    1,334
    Distro
    Ubuntu Development Release

    Re: Backup using Rsync, Bash & Cron

    Quote Originally Posted by sirlancelot View Post
    Or better, use
    Code:
    $HOME
    Truth- a simple oversight on my part.

    That would greatly simplify the commands, and prevent any type of confusion. Thanks again for a great guide!
    Java Guide Media support Flash x64 Grub2 Get Dropbox! My Look! RSync Twitter

    "Windows 7 was my idea"- I guess Microsoft enjoys copyright infringement?

  5. #15
    Join Date
    Jan 2009
    Location
    Buenos Aires, Argentina
    Beans
    669

    Re: Backup using Rsync, Bash & Cron

    This is exactly what I've been looking for.

    Thank you.

  6. #16
    Join Date
    Mar 2006
    Location
    Canada
    Beans
    1,313
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Backup using Rsync, Bash & Cron

    I also have a script that does ssh/rsync/cron over at http://ubuntuforums.org/showthread.php?t=639979 / http://github.com/brettalton/rsync-over-ssh if it's of use to anyone.

  7. #17
    Join Date
    Jan 2013
    Beans
    1

    Re: Backup using Rsync, Bash & Cron

    With apologies for reviving an old thread, but people arriving here may be interested in a complete & tested backup script based on rsync cron and bash.

    See below for a ready made solution that builds on the excellent work of Mike Rubel (http://www.mikerubel.org/computers/rsync_snapshots/), but with many additional features:

    * Keep an archive of data up to one year back

    * Reliable and persistent
    Continues to retry transfering the files until succesful, or a user set
    max retry limit.

    * Use soft links to identify the most recent succesful backup
    Incomplete backups will not be used for the next incremental backup.

    * Advanced locking
    Only one instance of the backup will run at any given time. A long
    (remote) backup will never be overun by the cron job from the next day.
    Stale lock files will be removed automatically.

    * True set & forget functionality
    Runs from a cron job, and only bothers you if an error occurs. Weekly
    emails inform you the cron job is still present and functional.

    * Backup to and _from_ remote hosts as well as local disks

    * Versatile & compatible
    Remote machines can run bash and csh as their native login shells (and
    possibly others).

    * Free & open source software released under the BSD license

    Please check for yourself and let me know what you think. A description and link to the latest version can be found here:

    http://eschauzier.wordpress.com
    Last edited by RudyE; January 23rd, 2013 at 05:01 PM.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •