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


Click here to return to the 'bah. use rsync.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
bah. use rsync.
Authored by: Lectrick on Jun 27, '05 05:05:10PM
I have too much stuff to even back up to DVD (nor do I have time to sit there babysitting a backup and swapping DVD's), so I have to use a second drive. Here's my one-liner backup, either run manually or scheduled in Cron with Cronnix in the system crontab (in the latter case you have to remove the "sudo" as it runs in admin mode anyway):

sudo /usr/bin/rsync -a --delete --partial --exclude "/.*" --exclude "/dev/*" --exclude "/Desktop*" --exclude "/*Volume*" --exclude "/Network*" / /Volumes/Backup/

(Replace "/" and "/Volumes/Backup/" with the path you want to back up from, and the path you want to back up to. In my case, these are two drives.)

I know it works because I recently had a major directory corruption issue that required me to reformat the disc. I only lost 2 days' worth of stuff since I was able to boot right off the backup drive using this method, and then copy the contents back to my main drive.

If you are running this from the command line manually and want to see progress indication, put a "v" after the "-a" for "verbose" and also add the "--progress" switch. Watch it fly.

I suggest a twice-a-week backup schedule. If you want to get more sophisticated you can set up a nightly and a weekly to two different drives/locations. Both have advantages (mainly revolving around discovering a mistake after your only backup already occurred, preventing you from restoring to a state previous to the mistake)

Advantages of using rsync for this:

1) Only copies changed files, and even only changed parts of larger files
2) If you later move to an offsite backup, a minor change to the rsync parameters will give you an encrypted, compressed transfer of just your changed information, to anywhere on the Internet (even another non-Microsoft OS!)
3) Uses Apple's Tiger implementation of rsync, so resource forks are preserved. (note: you can't use this method in Panther- I suggest psync or Carbon Copy Cloner for that) 4) Creates a live bootable drive. I was back up and running in 5 minutes in my case, even though I did lose some work.

Lastly, I STRONGLY suggest testing out ANY backup process. Consider it "disaster recovery procedures". Do NOT wait till you actually have a failure to test your backup plan!

---
In /dev/null, no one can hear you scream

[ Reply to This | # ]

bah. use rsync.
Authored by: rflo on Jun 28, '05 10:41:26AM

The problem with rsync as a backup tool under MacOS 10.4 is that without the -E option, resource forks are not backed-up. And with the -E option, the MacOS 10.4 rsync sets the file date/time to the present -- which isn't what you want on a backup.

It should be more useful when Apple fixes it, perhaps in 10.4.2.

---
Ronald Florence



[ Reply to This | # ]
Backup script for 10.4
Authored by: dougmoby on Feb 09, '06 12:05:55PM

Beware of long filenames and pathnames. The -M option works with gnu tar in OS X 10.4 as long as all filenames (including path) are fewer than 100 characters. I had major headaches over this issue when trying to archive my hard drive over multiple DVDs. The authors of gnu tar promise POSIX and Multi-volume compatibility in later versions (see http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html#SEC127), but for now be very careful.



[ Reply to This | # ]
In the meantime, what about psync?
Authored by: Thom on Jun 29, '05 10:36:13AM

It was my understanding that the psyncX utils were mac resource-fork aware, and had been around for a while now.

http://sourceforge.net/projects/psyncx

It is also my understanding that Bombich's excellent Carbon Copy Cloner utility is, in some part, a front-end GUI wrapper for psync.

Here is another useful page I found:

http://www.chemistry.ucsc.edu/~wgscott/xtal/backup_hfs_stuff.html



[ Reply to This | # ]