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

Dark Lain

macrumors member
Original poster
Apr 29, 2005
49
6
I know some of the basics of working in command line on the Mac.

To save hard disk space on my Mac I store a large proportion on an external hard drive and back up that hard drive to another external drive.

I would like to use rsync to periodically backup my main external hadrive minus Time Machine back over to the other hard drive and when I delete something from my main external drive rsync should also take this into account.

Here is my rsync script.

Code:
#!/bin/sh 
backup=/volumes/Backup_Drive_2
rsync -aP --delete --exclude-from=rsync_excludes.txt /Volumes/Backup_Drive $backup

Here is my exclude-from.txt

Code:
Backups.backupdb
LaCie.ini
Bin
Desktop DB
Desktop DF
Icon
*.Spotlight
*.Trashes
*.ds_store

Thanks in advance for your comments and suggestions.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.