Use psync to create incremental backups

Jul 11, '02 09:10:17AM

Contributed by: David

I just found out about psync, which does exactly what I was looking for. I had been wanting to set up a cronjob to automatically backup my hard drive, but I didn't want a compressed backup. I wanted all resource forks kept intact as well as all permissions. To top that off, I wanted only files that had been modified since the last backup to be copied to my FW hard drive.

Read the rest of the article to see how to set up psync...

First off, you need to open up the Terminal. Once it is open, you need to open up the perl CPAN shell:

 % sudo perl -MCPAN -e shell
If this is the first time you've run the CPAN shell, you'll need to configure it (either auto or manual). Once that's done, at the prompt (cpan>) that shows up, type this in:
 install MacOSX::File
After the MacOSX File module has been downloaded and installed, type "quit" to exit the CPAN shell.

Okay, are you ready for this? Type:
 % sudo psync / /Volumes/Your_FW_Hard_Drive
Press return, and type in your admin password. You're done. For more info, see man psync.

P.S. Anyone interested in helping to write a Cocoa wrapper for this cool utility?

[Editor's note: I followed the instructions and then tested psync by backing up my Documents folder to another drive, and it worked as expected -- permissions and resource forks intact. Test it before relying on it, but it looks to be quite useful!]

Comments (43)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020711091017747