Carlo Cancellieri
2010-Jan-25 12:13 UTC
[rsync] Using Protect filter on a merge rules file
Hy, I've a strange problem using rsync version
3.0.6 protocol version 30:
My /etc/rsyncd.conf:
---------------------------------------------------
...
[bianco-home]
read only = no
filter = . /etc/rsync/filter/bianco-home
path=/home/bianco/
list = yes
use chroot = no
auth users = bianco
uid= bianco
secrets file = /etc/rsync/rsyncd.secrets
...
----------------------------------------------------
and here is the /etc/rsync/filter/bianco-home file:
----------------------------------------------------
P *touch*
- /*/
- /.*
- */
- *
----------------------------------------------------
So this should filter any file into bianco-home and protect any *thouch* file in
the requesting client home (or not?)
In my remote client home (to syncronize) I've only a test file called
'atouchs'.
On the sender (rsync server) no 'atouchs' file is present.
Now from my client :
----------------------------------------------------
$rsync -Sav ${bianco_ip}::bianco-home /home/bianco --delete-after
----------------------------------------------------
and what I get is (password not matter):
----------------------------------------------------
$rsync -Sav ${bianco_ip}::bianco-home
/home/bianco --delete-after
receiving file list ... done
deleting atouchs
sent 63 bytes? received 115 bytes? 50.76 bytes/sec
total size is 0 sppedup is 0.00
$
----------------------------------------------------
So rsync delete the 'atouchs' file!!!
why???
NB:
doing instead:
----------------------------------------------------
$rsync -Sav -f 'P *touch*'
${bianco_ip}::bianco-home /home/bianco --delete-after
receiving file list ... done
./
sent 63 bytes? received 115 bytes? 50.76 bytes/sec
total size is 0 sppedup is 0.00
$
----------------------------------------------------
File is not deleted!
I've tried also:
-using an exclude rule
-using '--delete'
Someone may help me?!
What I want ...
even the file is present or not into the sender:
- do not delete it on the receiver (but delete all the other files not specified
into the filter!!! --delete is needed)
- ... understand how 'P' rule works ...
thank you.
_________________________________________________________________
Non sei a casa? Prova il nuovo Web Messenger
http://www.messenger.it/web/default.aspx
On Mon, Jan 25, 2010 at 4:13 AM, Carlo Cancellieri <ccancellieri at hotmail.com> wrote:> So this should filter any file into bianco-home and protect any *thouch* > file in the requesting client home (or not?) >Daemon filter rules only affect the daemon. So, if it is receiving files, it will not delete files that are protected, but the client never sees any of the filter/exclude/include rules that are daemon-specific. The standard for rsync is for the client side to share its rules with the server, and the daemon is never the client. So, if you need the client to obey a filter rule, either specify that rule to the client, or specify that the client read per-dir merge rules from files that are included in the transfer (and limit yourself to delete-after or the files won't be there in time to affect the delete). ..wayne.. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20100126/d4894e3e/attachment.html>