Results 1 to 5 of 5

Thread: Rsync or Rdiff-backup?

  1. #1

    Rsync or Rdiff-backup?

    Hello!

    Currently I'm keeping a nightly backup of my web server files with Rsync: with crontab I synchronize files between the server (CentOS) and my "home server" (an old-fashioned Pentium III with Ubuntu server).

    I just discovered that rdiff-backup makes, more or less, the same work, but it has incremental features, allowing me to recover the last version of the backup, or a previous one. Rsync is protecting me from disasters, but an incremental backup with... "time machine" features (see Apple ) will protect me also from "human errors".

    I'm asking if:
    - does rsync can do incremental+differential backups?
    - does rdiff work in ssh tunnels?

    Thank you for answers!!

  2. #2
    Join Date
    Jan 2008
    Location
    Sittingbourne, UK
    Beans
    196
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Rsync or Rdiff-backup?

    You could quite easily setup an incremental backup with rsync and the aid of a shell script so that prior to each backup the previous backup data was copied to another folder (with the previous backup date as the name), then the changes synced to the previous version. I'm not sure rsync can do a fully automated incremental backup on it's own though!

    There are some nice backup programs out there that do things like mirror your entire drive (incrementally) on a daily basis so that in the event of a complete drive failure or something you can recover the enter drive to the exact state of the last backup. These are commercial products though and pricey.

    I've no idea what Apple's time machine is but I assume it's something they ripped off from someone else and then branded as a 'revolutionary' new product like most of their product range

  3. #3

    Re: Rsync or Rdiff-backup?

    Quote Originally Posted by Philio View Post
    I've no idea what Apple's time machine is but I assume it's something they ripped off from someone else and then branded as a 'revolutionary' new product like most of their product range
    LOL! Ok, it's something that keeps trace of differences between directory contents and allow to "bring the clock back" to a certain date

    The solution you suggest (use a scheduled command to copy the old backup in another directory, then syncronize the original) is ok, but it will require a lot of space... rdiff-backup creates service files in the backup directory where only changed files are stored, to recreate the files' structure in a specified date in the past (here's the similarity with apple's time machine). With this method, it reduces the space requirements at the minimum...

  4. #4
    Join Date
    Jan 2008
    Location
    Sittingbourne, UK
    Beans
    196
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Rsync or Rdiff-backup?

    Quote Originally Posted by flip79 View Post
    LOL! Ok, it's something that keeps trace of differences between directory contents and allow to "bring the clock back" to a certain date

    The solution you suggest (use a scheduled command to copy the old backup in another directory, then syncronize the original) is ok, but it will require a lot of space... rdiff-backup creates service files in the backup directory where only changed files are stored, to recreate the files' structure in a specified date in the past (here's the similarity with apple's time machine). With this method, it reduces the space requirements at the minimum...
    So they copied System Restore off Windows?
    Or maybe cvs/svn is a better comparism!

    Back to the topic though, rdiff certainly sounds better, I've never actually used it personally. I was just suggesting this as a possible method with rsync, you could obviously improve things further by retaining backups for x number of days then clean them, zipping up folders etc but then if rdiff does incremental backups on it's own it would be a better solution.

  5. #5
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: Rsync or Rdiff-backup?

    I have read of people using rsync ot make daily backups with a little trickery. Google for "rsync backup" and you should be able to find it. The gist of it is that you copy yesterday's backup to a new directory, but you pass a switch to cp instructing it to hard link the files instead of actually copy them, that way it doesn't take up any more space. Then when you rsync to today's copy, there was a switch to rsync to have it copy, unlink, and replace a file before it updates it so as not to modify the original copy still linked to by the previous directories.

    That way you end up with a different directory for each day you back up that appears to contain all of your files as they existed that day, but it doesn't take up additional space for each day where a given file wasn't changed. Then after a few days, you delete the oldest directory you don't want to keep any more.

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
  •