The lastest (work in progress) version of bdsync can now be downloaded from GitHub.
Client: bdsync [--verbose] [--digest=DIGEST] REMSHCMD LOCDEV REMDEV Server: bdsync --server [--verbose] Patch: bdsync --patch[=DSTDEV] [--verbose]
Bdsync can be used to synchronize block devices over a network. It generates a "binary patchfile" in an efficient way by comparing checksums of blocks of the local block device LOCDEV and the remote block device REMDEV.
This binary patchfile can be sent to the remote machine and applied to its block device REMDEV, after which the local blockdev LOCDEV and the remote block device REMDEV are synchronized.
bdsync was built to do the only thing rsync isn't able to do: synchronize block devices.
Bdsync assumes a client is connecting to a server. The connection isn't established by the client itself, but by a remote-shell-command REMSHCMD. This REMSHCMD can be any kind of command to make a connection: rsh, ssh, netcat.. If using rsh or ssh REMSHCMD should be the full command to make the connection including the remote bdsync command te be executed in server mode. If using netcat to make the connection, the remote server mode bdsync command should be executed by inetd, xinetd etc.
The --verbose option results in verbose output. In Server mode the output will be sent to syslog. The --verbose option can be repeated raising the verbosity level.
Bdsync can be initiated like this in its most simple form:
This generates a patchfile DEV.rsync of the /dev/LOCDEV and the /dev/REMDEV devices which both are local. A more realistic example is this:
This bdsync client makes an ssh connection to foo.org as user doe and executes a bdsync client by passing it the --server option. The generated patchfile output is passed on to gzip which creates a compressed patchfile DEV.bdsync.gz.
On the remote machine foo.org the user doe can apply the patch by executing:
The reason to use a binary patch file instead of instantly patching the remote block device REMDEV is twofold: