ds (as in «Desktop Synchronization»)

«ds is a command line tool for manual, but quick and easy one-way syncing/mirroring of data to/from remote hosts. It uses rsync(1), ssh(1) and gconftool-2(1) to accomplish its tasks.»

I tend to switch between different computers, and I wanted some command line utility which made explicit synchronization of application data and configuration easier than having to invoke rsync directly. The result of this was ds*, which mainly works as a convenient wrapper around rsync, allowing you to define named sets of data (typically files/directories under your $HOME directory). These «sync items» can then be pushed or fetched to/from remote hosts with ease. It is meant to be used interactively and has support for generating Bash-compatible command line auto-completion code. Ds itself is written in POSIX compliant plain Bourne shell and is compatible with for instance dash, which runs much faster than standard GNU bash. Dash also happens to be the default «/bin/sh» implementation on Ubuntu/Debian.

* Used to be called «dsync», but I renamed it.

Get it here: ds.sh, version 0.87 (2010-10-29) [PGP signature: ds.sh.asc]

Version 0.87:

Version 0.86:

Version 0.81:

Version 0.80:

Version 0.75:

Version 0.70:

Simple example to demonstrate typical usage:

$ cat ~/.ds.conf              # contents of config file
# Default host to sync to/from
default_host host.net

# The Foo item, with files/dirs relative to $HOME
# Directories are always synced recursively.
item Foo
  files foofile1 foofile2 foofile3
  dirs foodir1/ bardir2
  group default

$ ds push Foo to host.net     # update Foo on host.net
# .. Do stuff with Foo resoures on host.net ..
$ ds fetch                    # fetch Foo (synced by default) from default host (host.net)
$ ds log                      # show sync log
$ ds log remote host.net      # show sync log on remote host host.net
$ ds -H                       # show detailed help
$ ds conf example             # show example config

Note: The default behaviour of ds is to do proper mirroring when pushing or fetching data. This means that it can delete files or overwrite newer files at the destination of a synchronization (rsync(1) `--delete' and `-a' options). This is default behaviour to ensure consistency of typical application configuration data, but can be overriden in the config either for particular items or globally. Also, there is no conflict handling, because that is what I consider out of scope for this tool. Using the sync log, you can determine when and where an item was last synced and act accordingly. See help and config examples and make sure you understand it.