Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to prevent damage from rm -rf malware' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to prevent damage from rm -rf malware
Authored by: Fil Machi on May 18, '04 10:06:45PM

The example rsync command line by merlin contains an error. Try this:

rsync -a --delete --link-dest=$HOME $HOME/ /backup/path/for/home

Note the trailing slash '/' on $HOME/. Without it rsync creates /backup/path/for/home/X/*, where X is the name of your home directory, and rsync then can not match up paths correctly between the backup directory and the link-dest directory.

With the trailing slash rsync creates /backup/path/for/home/* and --link-dest works as expected.

Also, the stock rsync that comes with OS X does not copy the resource fork of HFS+ files. So backups of HFS+ directories created using it can not really be called backups. Install and use the resource fork aware version of rsync, aka rsyncx from versiontracker (http://www.versiontracker.com/dyn/moreinfo/macosx/16814).



[ Reply to This | # ]