I do believe that rsync is the greatest command line application ever, well… maybe next to ssh. I’m no longer spending half an hour waiting for my PowerBook to get every file in my music folder from my G5 so that I have all of my music, instead rsync does an incremental update - it only copies new and changed files. It’s incredibly easy to do as well, I just run this command on my G5 (the master copy/source):
rsync -a ~/Music/ justin@laptop.bellmor.com:~/Music/
Rsync is also particularly useful for doing incremental backups. I use rsync to maintain a backup of my very-expensive-to-replace music collection on the server. Since I have to backup incrementally (otherwise I’d spend two days waiting for the backup to complete), rsync is the only way to go. The only changes I made from syncing my music to my PowerBook were adding two parameters, --delete and --exclude='*.m4v'. --delete will delete anything on the destination that’s not on the source (so if I delete a song from my library on my G5, it’ll delete the song on the server). --exclude='*.m4v' makes sure I don’t back up those massive movies you can get from iTunes. When you combine rsync with crontab and public key authentication, you get completely invisible and automatic backups. Here’s what my rsync command in my crontab looks like:
30 18 * * * rsync -a --delete --exclude='*.m4v' ~/Music/ backup@bellmor.com:/home/backup/Music/ > /dev/null 2>&1
0 Responses to “Rsync”
Leave a Reply