Re: --delete option does not always work

2006-09-09 Thread Mario 'BitKoenig' Holbe
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


Re: --delete option does not always work

2006-09-09 Thread Mario 'BitKoenig' Holbe
On Sat, Sep 09, 2006 at 12:22:57PM -0700, Wayne Davison wrote:
 This is a different bug that was recently fixed:  using --relative with
 a root (/) filesystem and --delete was also failing to delete.  The
 latest CVS source and recent nightly tar files have this fixed.  Here's
 the bug (which has an attached patch):
 https://bugzilla.samba.org/show_bug.cgi?id=3929

Oh, thank you very much.


Mario
-- 
Evidently men are more intelligent than women. Every woman on earth
believes that men should be able to read minds. Every man knows this
is impossible. Ergo, we are more intelligent.


signature.asc
Description: Digital signature
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html