Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ncmason

macrumors regular
Original poster
Feb 27, 2007
126
0
Can someone please give me an AppleScript that will backup my Home folder onto a backup folder I made on my External HD?


Thanks,
Mason
 

ncmason

macrumors regular
Original poster
Feb 27, 2007
126
0
Carbon Copy Cloner

I have used CCC before and really didn't have a great experience with it. Do you know of any other solutions besides CCC? I would like it to atleast be an AppleScript.


Thanks again,
Mason
 

thecombatwombat

macrumors regular
Mar 15, 2004
144
67
rsync

You don't need an Apple Script, OS X comes with an old command line utility called rsync. For a really basic backup, just run "rsync -a /Users/username /Volumes/externalharddrivename/" in your terminal.

Note the lack of a trailing / on the first path, this is important. A trailing / means "the contents of" rather than the folder itself. So with a trailing /, all of the contents of your home folder would be dumped onto the root of the external hard drive, without a copy of the folder itself.

Run the same command again, and only the files that have changed will be moved. By default, files you've deleted in your home folder will not be removed from the backup, add "--delete" right after the "-a" if you want deleted files to be removed from your home folder. rsync is very powerful, if you want more information, run "man rsync" in your terminal.
 

ChrisA

macrumors G5
Jan 5, 2006
12,907
2,155
Redondo Beach, California
Just use rsync

It's trivial. Just one line.

But don't copy your data to an external drive use "rsync". It will copy over only the files that have changed since the last time you sync'd. It will go much faster. It is the one line script:

rsync ~username /Volumes/mydisk

Of course you need to replace "username" and "mydisk" with real names. If you want to automate this to run say ever night then you can give the name of your backup script to "crontab".

For more info, from the terminal type "man rsync" and "man crontab". If you read up you will see that rsync is pretty smart and can "sync" data over a network or across the Internet if you ask it to. But going to an external drive is easy.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.