[rsync] Using Protect filter on a merge rules file

Carlo Cancellieri ccancellieri at hotmail.com
Mon Jan 25 05:13:53 MST 2010


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


More information about the rsync mailing list