Hi, I am using --link-dest for my rotating backups. Noticing the "--detect-renamed-lax" patch to rsync 3.0.0. I was hoping to make use of the --detect-moved. Unfortunately, "--detect-moved" does not seem to recognize the --linkdest option. A moved file is getting transferred again and a new file is created at the receiving end instead of linking to the moved file. Am I doing something wrong or is --link-dest simply not supported by --detect-moved? Here is the command I am using: /usr/bin/rsync -aHxh --stats --numeric-ids --detect-moved --link-dest=/path/to/oldbackup --password-file=/XX user@remote::module/ /path/to/backup I am using a detect-rename-lax patched version of of V 3.0.0 and both ends. ... Matt
On Fri, 2008-03-07 at 14:20 +0100, Matt wrote:> I am using --link-dest for my rotating backups. Noticing the > "--detect-renamed-lax" patch to rsync 3.0.0. I was hoping to make use > of the --detect-moved. Unfortunately, "--detect-moved" does not seem > to recognize the --linkdest option. A moved file is getting transferred > again and a new file is created at the receiving end instead of > linking to the moved file. Am I doing something wrong or is --link-dest > simply not supported by --detect-moved?The latter: the --detect-* options only detect files in the destination directory, not --*-dest directories. Modifying rsync to scan --*-dest directories too would take a considerable amount of additional code. To accomplish what you want with the currently available tools, you could prepopulate the destination with "cp -al" instead of using --link-dest and then pass the --no-tweak-hlinked option implemented by the following patch to avoid any attribute-tweaking issues: http://mattmccutchen.net/rsync/rsync.git/?a=commitdiff_plain;h=refs/heads/tweak-opts Matt
Apparently Analagous Threads
- DO NOT REPLY [Bug 3693] New: rsync can use same --link-dest file several times, leading to incorrect hard links
- Bug#666024: rsync --link-dest can incorrectly hardlink together destination files
- issues syncing between one host and another
- [Bug 10678] New: performance problem with lots of hard links?
- check "--link-dest" directory first