Overview -------- dsync is a pair of simple shell scripts that I use for for synchronizing files (.bashrc, .emacs, address book, .xinitrc, ...) among various machines. It uses CVS to merge changes made on different machines. This is a work in progress; you probably shouldn't use it unless you're willing to lose data. All the usual disclaimers apply. Installation ------------ 1. Select a machine as your dsync server and put dsyncd in a non-dsynced component of your PATH on that machine. Your dsync server may also be a client. 2. Copy dsync to some non-dsynced location on each client machine. Usage ----- Periodically, on each client machine, run: dsync where is the name of the local machine, used as a CVS tag is the machine where the CVS repository lives is the directory on where the CVS repository lives is one or more directories on the local machine to synchronize with the repository The repository on the server will be created and updated automatically as needed. When adding a new client for one or more that exist on the server, dsync will abort if already exists on the client. As a special case, when previously-synced directory is deleted on a client, the next sync will restore that directory on the client. For convenience, I alias "ds" on each of my machines to the appropriate dsync invocation. For example, on my laptop nog.nick.duffek.com with dsync server nod.nick.duffek.com, ds is aliased to: dsync nog nod.nick.duffek.com /home/nsd/.share \ /home/nsd/share /home/nsd/share-all /home/nsd/bin Implementation -------------- "dsync" is a tiny shell script that starts rsync in daemon mode, opens an ssh connection to , forwards a port to rsync, and runs "dsyncd" on . "dsyncd" is a shell script that rsyncs files from the client, merges them into the repository, and rsyncs the results back to the client. Requirements ------------ On the server: cvs sshd rsync sh On each client: ssh rsync sh Bug Reports ----------- Please send bug reports to Nick Duffek . Changes ------- dsync-0.2, December 24, 2003 * Abort if any command fails in dsyncd. Should be much safer now. * Improve documentation a bit. * When adding a new client for an extant directory on the server, require that the directory not exist on the client beforehand. * Add the special case of restoring deleted client directories. * Get file deletion working properly. * Don't let .#* files accumulate. dsync-0.1, March 7, 2003 * Initial revision.