dive into mark

You are here: dive into markArchivesMay 2003Backing up with rsync and ssh

Friday, May 2, 2003

Backing up with rsync and ssh

Several people have asked me to elaborate on my backup scripts (now that I have them). Luckily, Mike Bombich (of Carbon Copy Cloner fame) has already written a fine tutorial on remote administration/backup of OS X using rsync.

While his examples are OS X-specific, the concepts are the same on any operating system that supports rsync and ssh. I used essentially the same procedure on my Windows laptop (running Cygwin), and of course the utilities are standard on any Linux or BSD system.

Only one thing to add: Mac OS X users who wish to back up Mac-specific files (those with both data and resource forks) should look into RsyncX, which not only supports resource forks, but also comes with a decent graphical interface for setting up backup scripts. My experience is that it should only be used in pure Mac environments; I tried to use it to back up documents from my Linux server to my iMac, and I ran into all sorts of problems as it was looking for resource forks that weren’t there.

I am working on further automating the process with rsync snapshots (backing up the backups). The idea is to keep several days worth of backups in case, say, the server is compromised and important files are deleted, or files get corrupted at some point and I don’t catch it immediately. More on that as I figure it out.

Filed under , , ,

10 comments

  1. may want to look into Unison as well: http://www.cis.upenn.edu/~bcpierce/unison/

    Comment by 3 — Friday, May 2, 2003 @ 12:22 pm

  2. http://samba.anu.edu.au/rsync/examples.html

    Top example uses rsync do do a full current and a 7 day incremental backup.

    Comment by Anonymous — Friday, May 2, 2003 @ 12:42 pm

  3. This is similar to what I use: http://gary.burd.info/content/news/25.html
    With a good reference for the whole thing here: http://www.mikerubel.org/computers/rsync_snapshots/

    Comment by John Beimler — Friday, May 2, 2003 @ 12:49 pm

  4. The Rubel method (#3 above) is superior to rsync’s built-in method (#2 above) because the Rubel method gives you a complete sets of files for each snapshot.

    Comment by Anonymous — Friday, May 2, 2003 @ 1:21 pm

  5. I do not know how useful it is on mac or windows, but there is also rdiff-backup ( http://rdiff-backup.stanford.edu/ ). It does much of what you describe (may snapshots of reverse diffs) and it’s all python (well, except for librdiff).

    Comment by Anonymous — Friday, May 2, 2003 @ 1:56 pm

  6. Take a look into unison. It does a *fantastic* job of bidirectional syncronization. I only use it from unix-to-unix and unix-to-pc setups so I can’t comment on it’s Macintosh compatibility.

    All I can say is that unison takes next to nothing to setup and run, has a friendly configuration file format and an extremely simple invocation mechanism.

    unison - http://www.cis.upenn.edu/~bcpierce/unison/

    Comment by Bill Kearney — Friday, May 2, 2003 @ 5:47 pm

  7. Trackback by WE ARE HUGH
  8. Here’s a few more helpful links for us lame Windows users:
    http://optics.ph.unimelb.edu.au/help/rsync/
    and
    http://rsync.samba.org/nt.html

    Comment by Mean Dean — Saturday, May 3, 2003 @ 1:04 am

  9. Trackback by Michael Tsai's Weblog
  10. Trackback by Axiomatic Breakfast

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



Recent Stuff For You, Special Price Stay Here
  • Greasemonkey Hacks
Good Stuff Buy The Cow Go Away
Dive Into Python
Powered by Google Drink The Milk Don't Steal

 

posts / comments
© 2001-8 Mark Pilgrim