Hi,
Wayne Davison [EMAIL PROTECTED] wrote:
OK, I had a free moment to work up a fix, and here it is. It was
pretty simple.
I'm sorry to wake this up again, but it seems not to be so simple to
fix at all :)
I've stumbled over this while noticing that the rsnapshot backup of my
root-filesystem simply never gets anything removed at all. So I made
some tests:
[EMAIL PROTECTED]:~# rsync --version | head -1
rsync version 2.6.8 protocol version 29
[EMAIL PROTECTED]:~# rsync -HSaxvn --delete --relative /
/mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting
0
[EMAIL PROTECTED]:~# rsync -HSaxvn --delete /
/mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting
264
[EMAIL PROTECTED]:~# cd /
[EMAIL PROTECTED]:/# rsync -HSaxvn --delete --relative .
/mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting
264
[EMAIL PROTECTED]:~# rsync -HSaxvn --delete --relative /.
/mnt/rsnapshot/daily.0/darkside/root | grep -c ^deleting
0
As you can see, the only workaround that seems to work is cd / and
using . then.
However, this is not always possible, i.e. when rsyncing some.host:/
Of course, it would be simple to just avoid the --relative in this
special case. But this is also not always possible, i.e. when using
rsnapshot (:)) or - more serious - when rsyncing multiple sources at
once like rsync -HSaxvn --delete --relative / /home /target
Perhaps, a possible solution could be to temporarily disable --relative
in the rsync code directly as long as it works on a /
Though, I'm not absolutely sure about the side-effects of this (i.e.
with include/exclude lists).
I'm using Debians rsync 2.6.8-2 which should have Waynes patch
included. At least Lennys test-case in the beginning of this thread
is not reproducible with this version.
regards
Mario
--
As a rule, the more bizarre a thing is, the less mysterious it proves to be.
-- Sherlock Holmes by Arthur Conan Doyle
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html