Rsync Your Mac OS/X Data

Scenario # 1 - All data is accessible from the desktop

Assuming your user name is WhatsYourFace you could just type this command in to the terminal window.

rsync -r -u -v /Users/WhatsYourFace/* /Volumes/Backup/WhatsYourFace

If you don't know your WhatsYourFace you can find out usually by simply opening a terminal window and using the pwd command:

pwd
/Users/WhatsYourFace/

and then you know that you are user WhatsYourFace and you are in the directory /Users/WhatsYourFace/.

Rsync Your Mac OS/X Data to a Local Drive With a Three Line Script

Things get a bit more complicated when backing up from more than one point. That is when a simple script can be created to do the job. Here is a simple case of backing up from two data points with a file that I named RsyncToBackupDrive.csh:

#!/bin/csh
rsync -r -u -v /Stuff/* /Volumes/Backup/Stuff
rsync -r -u -v /Users/WhatsYourFace/* /Volumes/Backup/WhatsYourFace

Explanation:
Line #1 - tells unix that it is a cshell script that is executed by the program /bin/csh
Line # 2 sycronizes the default hard drive's Stuff folder with the backup volume named Backup.rsync -r -u -v /Stuff/*
Line #3 Finally, the last line sycronizes the default hard drive's /Users/WhatsYourFace/ folder with the backup volume named backup - this is the main kahoona. It backs up all your e-mail, itunes and just about anything else important to you.

Notice that your default system drive doesn't need the /Volumes designator. You can verify the paths by going to the terminal window and using the following commands.
ls -laF
cd
pwd

"ls -laF" lists the contents of directories for you
"cd" changes directories
"pwd", as explained above tells you where you are.

So there you have it. Easy as pi.

Return to Jim's Trix Page
Return to Jim's ISER Page

Return to Profiles or Directory Page or ISER Home Page
Page Updated March 30, 2006