Send As SMS

3/6/2006

use rsync to backup a directory

if you've got access to a file server, rsync can be a godsend.

for instance, i use the following one-liner to synchronize my itunes music folder with my music server:

rsync -av --progress --size-only --delete --rsh=/usr/bin/ssh ~/Music/iTunes/iTunes\ Music/ user_name@server_address:~/Music/
this command copies all of the music in my laptop's itunes directory to the ~/Music directory on the music server. what's cool is that if i delete a song or album on my laptop, rsync will delete the corresponding file or directory on the music server.

this works of course on linux; mac users can also execute this command using the os x terminal.


0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://stinkpot.afraid.org:8080/tricks/ and update your bookmarks.