Syncing folders in OSX

Associate
Joined
2 Dec 2009
Posts
159
Hi all,

I have a NAS that servers media files to numerous devices in the house. It's content is organised on an external FW drive attached to the iMac and then copied over to the NAS every so often. I'd like to automate the process if possible.

I've looked at using rsync but struggling to get it working how I'd like. Basically I want it to only copy/delete/move files that have been changed, I dont want it to do a full copy each time as that'd take too long. This is what my script looks like so far:

Code:
#Creates directory for mount point
mkdir /Volumes/HomeMediaServerSync
#Mounts NAS to the above location
mount_smbfs //admin:[email protected]/Public/Volumes/HomeMediaServerSync
#Uses rsync to copy only changed files and delete those that are no longer there from source
/usr/bin/rsync -au --delete '/Volumes/External/Media/TV Shows' '/Volumes/HomeMediaServerSync/Shared Videos/TV Shows'
#Unmount the share
umount /Volumes/HomeMediaServerSync

Is that what I'm after? Testing on a few files it seemed to work, but when I set it going on a large fileset it went haywire.

Cheers!
Adam
 
I may be a little rusty with rsync but won't that result in it syncing /Volumes/External/Media/TV Shows with /Volumes/HomeMediaServerSync/Shared Videos/TV Shows/TV Shows ?
 
Back
Top Bottom