Need precisions on --detect-rename
Bruno Pelletier
pelletier048 at yahoo.ca
Mon Aug 23 21:05:07 MDT 2010
Hi all,
I am reading everything I can find (including this mailling list archives) for
the last 2 weeks, on how to handle moved and/or renamed files with rsync. I
would have preferred to use an unmodified rsync, and I think I could make it for
the “moved files” with a 3 steps process like this :
1- rsync -avz --delete --backup --backup-dir=$TEMP_BACKUP --existing
--ignore-existing $SOURCE $DESTINATION
2- find .$TEMP_BACKUP -type f -exec mv '{}' $TEMP_BACKUP/ \; ### “flatten”
the hierarchy moving all files to top dir
3- rsync -avz --compare-dest=./temp_backup $SOURCE $DESTINATION
but it looks like the only way for "renamed files" is the --detect-rename
patch. When I first found about the patch, I was feeling it not safe, but with
further reading, I am now comfortable to give it a try.
My setup :
1. Ubuntu 9.04 with rsync 3.0.5 on a “SheevaPlug computer” with a usb drive
attached.
2. Unknown distro with rsync 3.0.2 on a “MyBook World Edition (white bar)”.
3. Don’t know yet witch one will be local and remote.
My questions :
1>> Is the "detect-renamed.diff" in the "rsync-patches-3.0.7.tar.gz" backward
compatible or is it a "must do" for me to use the patch from the respective “.5”
and “.2” version of the "rsync-patches-3.0.?.tar.gz" on the respective device.
2. >> If not backward compatible, is there significant behaviour, algorithm
or performance differences between each patch version listed above, or were they
just repackaged to match the new rsync version. I found no specific information
about improvement in the patch file “introduction” and really few further down
in what looked like the code itself.
3. >> Is it possible to install the patch only on one side? If yes, is
there a preferred choice for local or remote ? And would that make any options
(i.e. pull or push) mandatory?
4. >> Based on installation commands explained in the patch “introduction”,
I tried the following, logged in as root, with the diff file saved directly in
root directory, with both .5 and .7 version of the patch, with “<” and “</”,
with –p1 and –p0 :
patch -p1 <detect-renamed.diff
and all attempts terminated with the following message :
|diff --git a/compat.c b/compat.c
|--- a/compat.c
|+++ b/compat.c
--------------------------
File to patch:
appart from trying “–p0” instead of “-p1” all my research did not help me to
answer the “file to patch:” prompt... Any suggestion?
Sorry for the long post, I thought asking all my “installation related”
questions together was better for potential future readers.
Any help will be appreciated, thanks a lot in advance for your attention,
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20100823/4fed57c1/attachment.html>
More information about the rsync
mailing list