Moving files with rsync (rsync --move-files)      2003.08.13 @ 7:11:10 PM
rsync is an open source utility that provides fast incremental file transfer. rsync is freely available under the GNU General Public License. Unfortunately rsync does not allow you to move files after they are transferred (as it is a tool created for synchronizing, not moving), which is very useful for many applications. Fortunately in the open source world there is a patch for almost everything.

Wayne Davison wrote a nice patch that addresses this issue. It requires a previous patch though, both are available here:

http://www.clari.net/~wayne/rsync-nohang.patch
http://www.clari.net/~wayne/rsync-move-files.patch

Just in case, my local copy is available here, which works fine with rsync version 2.5.2

All you have to do is uncompress your rsync, put both patches inside and install them with:

patch -p1 < rsync-nohang.patch
patch -p1 < rsync-move-files.patch

If you did not get any errors, you can compile and install with: ./configure ; make ; make install

Keep in mind that the new rsync installs in /usr/local/bin. Execute /usr/local/bin/rsync --help and you will see that the --move-files parameters will show up.

IMPORTANT: Make sure you replace the existing rsync binary on both, local and remote machines.

All knowledge and software published in this website is released under the GNU General Public License (GPL)