Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


Backups

For backups, I now use incremental mirroring (using rsync) from disk to disk on a daily basis. I think of this as a manual replacement for RAID (which maintains the ability to recover from unintended deletions--I have used this feature!).

Under Linux, every night at 3am, a cron job runs the following backup script:

  #!/bin/csh -f
  # This file goes in /etc/cron.daily/
  #
  # This should have been done already by fstab:
  mount /dev/VolGroup01/LogVol00 /mnt/bkp
  mount /dev/VolGroup02/LogVol00 /mnt/bkpcum
  #
  # exact mirror backup:
  rsync --delete -au /home /etc /root /usr/local /mnt/bkp/myhostmirror
  #
  # cumulative mirror backup:
  rsync -au /home /etc /root /usr/local /mnt/bkpcum/myhostmirrorc
To arrange this, I merely added the script to /etc/cron.daily/.

I also rsync to a remote server (via DSL in the slow direction) as follows:

  rsync --exclude '.svn' -e /usr/bin/ssh -avvuz --del /home/me/ \
    mirror:~/ | perl \
    -e "while (<>) { print unless (m/uptodate/ or m/newer/ or m/hiding/) }"
where 'mirror' is listed in my /etc/hosts file. (Say 'man rsync' to investigate the options used.) The perl command thins the output so that I see only the files that are being updated--there's probably a better way to do this using rsync options.

Finally, I burn project-specific CD-ROMs once in a while, particularly when leaving a project for a while. I usually make two of each so one copy can be stored remotely.

Under Windows I run Beyond Compare nightly to mirror one disk to another. I sometimes also run rsync under Cygwin, e.g., using the alias

  alias mebkp 'rsync -avu /cygdrive/c/me/ /cygdrive/d/me'
(in my  /.tcshrc file). Most of my master copies are developed under Linux, and my email is mirrored automatically by procmail, so I rarely have anything to backup under Windows. Note how windows disk drives must be addressed under '/cygdrive' (something that took me a while to figure out). Beyond Compare is great when you want to really study the differences before copying across. I also use it over Samba to compare two different directories on my Linux machine.



Subsections
Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download mypc.pdf

``My Computers'', by Julius O. Smith III, Web document.
Copyright © 2008-06-08 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [About the Automatic Links]