detect-renamed for rsync ======================== I'm using a Raspberry Pi as a fileserver for family photos. I use `rsync` to synchronize my laptop to the raspberrypi and have a samba share to allow family to view the pictures. The problem is when I re-organize my images into new directories and sync them. My usual command was: rsync -av --delete pics/ pi@raspberry:~/samba/pics/ But when I only move files around to new directories or rename them, rsync will re-send any of the changed files. There are two patches to `rsync` that attempt to detect renames and moves. [detect-renamed](http://gitweb.samba.org/?p=rsync-patches.git;a=blob;f=detect-renamed.diff;h=5ba95b4eb1b5d0f79cd22719d56fdea72590f87f;hb=HEAD) [detect-renamed-lax](http://gitweb.samba.org/?p=rsync-patches.git;a=blob;f=detect-renamed-lax.diff;h=4cd23bd4524662f1d0db0bcc90336a77d0bb61c9;hb=HEAD) These patches are available in the `rsync-3.0.9.tar.gz` and `rsync-patches.3.0.9.tar.gz` file available [here](http://www.samba.org/ftp/rsync/). Bugzilla discussion for [Detect renamed files and handle by renaming instead of delete/re-send](https://bugzilla.samba.org/show_bug.cgi?id=2294). There is a defect in the above patch where "*.. [the partial-dir cannot be created because the directory for it does not yet exist. This is the case when a directory is renamed or a file is moved to a new directory.](https://bugzilla.samba.org/show_bug.cgi?id=8847)*". This 3rd patch fixes the shortfall. I used the above patches and now rsync detects moves and renames when I synchronize. Download and unzip rsync-3.0.9.tar.gz and rsync-patches-3.0.9.tar.gz from [here](http://www.samba.org/ftp/rsync/). Download the [improved detect-renamed](https://bugzilla.samba.org/attachment.cgi?id=7435) patch and replace `patches/detect-renamed.diff`. Note change of `patch -p1` to `patch -p0` for the adjusted patch. $ patch -p0 patspeak/SAM_4092.JPG found renamed: patspeak2/SAM_4091.SRW => patspeak/SAM_4091.SRW found renamed: patspeak2/SAM_4091.JPG => patspeak/SAM_4091.JPG found renamed: patspeak2/SAM_4090.SRW => patspeak/SAM_4090.SRW found renamed: patspeak2/SAM_4090.JPG => patspeak/SAM_4090.JPG I used `checkinstall` to create `.deb` files from the above compiles. You can download them direct if you don't want to compile yourself. Note, I increased the version number from `3.0.9` to `3.0.9.1`. * i386 [rsync_3.0.9.1-1_i386.deb](rsync_3.0.9.1-1_i386.deb) * armhf (raspberrypi) [rsync_3.0.9.1-1_armhf.deb](rsync_3.0.9.1-1_armhf.deb)