Welcome to WebmasterWorld Guest from 54.227.101.214

Forum Moderators: travelin cat

Message Too Old, No Replies

File Sync Software

     

aaronjf

10:21 pm on Nov 3, 2008 (gmt 0)

10+ Year Member



On PCs there is a function that allows you to sync something on your PC to an external disk every time you plug the drive in. Has anyone seen software like that for the Mac? I have "File Synchronization", but looking for something with more automatic functionality like mentioned above.

swa66

11:33 pm on Nov 3, 2008 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



OS X comes with a command line unix tool call rsync: it can (even on remote hosts) mirror a slave to a master copy. There's dozens of options.

You could do a multi-pass script, or jsut go for a single pass master/slave.

rsyc has a mutitude of options: check them with either

$ rsync --help
$ man rsync

I'm sure it can be automated on plug-in as well.

e.g.:


$ rsync --recursive --times --update --delete ~/Desktop/sync /Volumes/REMOVABLE

To see what it's doing add --verbose, to see what it would do, without doing it, also add --dry-run

It'll only copy the parts of the files that are needed.

To do a two way sync you need some more of the options and really understand the impact of what you do. Esp deleting files is tricky as you need to decide if a file is either deleted, or either added on the other store.

Hence to do a full two way sync with deletes requires stats to be kept to at least determine the time it was last run and clocks being set appropriately.
Still, a simple script could achieve it.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month