« gesamtschweizerische demonstration | Main | aktion à la carrefour »

backup without timemachine but with rsync

Short description of how I backup today. Far less elegant than the coming TimeMachine feature of Leopard, not as complete, and not automated. But I hope until the release of the beast it will do.

As every average geek I have an other machine than my main computer around which is up about 24/7. This computer, in my case a Mac mini, disposes of much more HD space than my laptop (via external FireWire Rack).

The basic syntax of the command I use: rsync [OPTION] SRC [USER@]HOST:DEST
How the command for my purpose looks: sudo rsync -avzPE --stats --timeout=600 --exclude-from=.excludefilelist / damian@dbirdz.dyndns.org:/Volumes/300barracuda/MacBirdPro

What the different parts mean:

  • sudo : makes certain system files accessible and is necessary to preserve file owner
  • -a : archive mode (recursive; preserve symlinks, permissions, times, group, owner, devices)
  • -v : verbose, so You see what's going on
  • -z : compress file data, greater CPU load but less network traffic, thus mostly faster (not recommended if backup destination is on the same machine)
  • -P : keep partially transferred files (very important, avoids redundant data transfer) and show progress during transfer
  • -E : copy extended attributes (i.e. Mac specific resource fork)
  • --stats : give some file transfer stats after having finished
  • --timeout=600 : if a transfer fails, retry while 10min to finish job before giving up
  • --exclude-from=excludefilelist : it may be clever to exclude some file from the backup. my file looks about as follows (entries preceeded by a # are ignored):
#/Volumes  
.vol  
/dev  
/Network  
#/private/var/vm  
/private/var/vm/sleepimage  
#/Developer
  • / : indicates which is the source directory, thus the whole root partition
  • damian : the username on the remote machine
  • dbirdz.dyndns.org : DNS name or IP of the remote machine
  • /Volumes/300barracuda/MacBirdPro : path to the remote directory where the backup will be written

If rsync is not yet installed on Your machine, You can get it via fink or from the rsync homepage directly.

Post a comment