Aw: Re: rsync remote raw block device with --inplace

Steve Newcomb srn3333 at
Mon Dec 31 19:03:10 UTC 2018

These responses have been very useful.  Thanks especially to *Roland*  devzero
installing diskrsync <> .  So far it
looks like it pretty much works.  It's written in Go, which I hadn't used
before.  There was a bit of a learning curve there, but I attached the
script I used to install it, which is a github-wiki script contributed by
"udif" which I have refined in minor respects.  (Attached.)

I still think this is a reasonable feature for rsync to have, but at least
there appears to be a reasonable solution -- diskrsync -- and I didn't know
about it before.

On Debian Buster/Sid and Debian 9, the following procedure worked, and it
will probably work on Ubuntu and other Debian derivatives.

Note: Be sure to install on both the source and target hosts! If diskrsync
is not found on the remote server, this message appears:

bash: /usr/local/ch-tools3/diskrsync: No such file or directory

Install procedure:

(1) sudo apt-get install golang

(2) As root (if necessary) put the following script in
dir-in-PATH/install_diskrsync.txt (below script contains minor refinements
of udif's script, above).


(3) sudo chmod +x dir-in-PATH/install_diskrsync.txt

(4) sudo dir-in-PATH/install_diskrsync.txt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
echo '## '
echo '## installing/updating diskrsync'
echo '## '
set -x

## customize below lines
export GOPATH="/usr/local/ch-static/GO"  ## wherever you keep your go projects
export EXECDIR="/usr/local/ch-tools3"  ## where the executable diskrsync command will be put
## customize above lines

export GOBIN="$GOPATH/bin"
export GOROOT="`go env GOROOT`"
export PATH="$PATH:$GOROOT/bin:$GOBIN"
mkdir -p ${GOPATH}/{bin,src,pkg}
mkdir -p ${GOPATH}/src/

cd ${GOPATH}/src/

if [ -d diskrsync ] ; then
    cd diskrsync
    git pull
    cd ..
    git clone diskrsync
go get -v
go build -v
go install -v
cp -p ${GOPATH}/bin/diskrsync "$EXECDIR"

set +x
echo '## '
echo '## finished installing/updating diskrsync'
echo '## '

More information about the rsync mailing list