an "intelligent" rsync script, dealing with renames

Antony Lesuisse al at udev.org
Thu Nov 3 03:18:54 GMT 2005


Tomasz Chmielewski <mangoo at wpkg.org> [051101]:
> Antony Lesuisse schrieb:
> >This is a late reply to a thread of Tomasz Chmielewsk
> >
> >http://lists.samba.org/archive/rsync/2005-October/013878.html
> >
> >He asked if some workaround existed for rename of big files.
> >
> >I've made a script (python needed on both sides) that links the guessed
> >files in the right directory and uses the --fuzzy feature of rsync. It
> >is used to mirror a 100Gb archive where files are often renamed.
> >
> >Maybe the algorithm could be included in the main rsync codebase. I
> >never understood why the --fuzzy feature was restricted to the same
> >directory.
> 
> perhaps a short note how to use it would be helpful?

the usage is simple:

./rsyncpp.py login at remotehost.domain:/remote/dir/ localdir/

The first argument must be a remote host path, and the second must be a
local dir. Excludes are not possible. But you may add some options such
as -e 'ssh with options'.

The script is very small 100 lines, the tricky part is the remote python
code upload (line 26).

It uses find to locate all the files on both sides and link the guessed
files to the right local dir with a .fuzzy extention. Then call the real
rsync.

-- 
Antony Lesuisse


More information about the rsync mailing list