
John R. McPherson wrote:
Actually getting around to writing a quick backup script also helps you think about which data on your computer is worth keeping "forever". For me it turned out that the only really critical stuff I'd want to keep is my digital photos. The /etc directory is useful too, although I could recreate similar config files myself. I wouldn't be able to recreate my photos. For reference (hopefully someone can use it for that purpose) here is my rsync backup script:
---------------------- #!/bin/sh export RSYNC='/usr/local/bin/rsync -a -z -u -v -4 --delete-after' # Back up currently installed packages information (FreeBSD) # If I need to rebuild the box, I like to know what was on it :) /usr/sbin/pkg_info > /etc/pkg_info # Back up WWW Data ${RSYNC} /www/usr/* /rsync/www # Back up MAIL Data ${RSYNC} /home/vpopmail/* /rsync/mail # Back up rsync realted scripts, because I hate having to recreate them! ${RSYNC} /root/bin/* /rsync/bin # Back up SubVersioN Data ${RSYNC} /pub/svn/* /rsync/svn # Back up configuration files ${RSYNC} /etc/* /rsync/etc ${RSYNC} /usr/local/etc/* /rsync/usr.local.etc <<EOF