[Samba] R­e: D­­C2 d­enie­s ac­cess­­ whe­­­n sa­­ving ­thro

Rowland Penny rowlandpenny at googlemail.com
Sun Nov 2 07:50:37 MST 2014

On 02/11/14 14:14, Rowland Penny wrote:
> On 02/11/14 12:34, ?icro MEGAS wrote:
>>> I am now getting a bit confused, just which script are you using ?
>>> Marc's which just uses rsync, or Louis's that uses unison and rsync ?
>>> Rowland
>> Hi Rowland, I am using the rsync+unison for bidirectional sync way. I 
>> did it like described here...
>> https://wiki.samba.org/index.php/SysVol_Bidirectional_Replication#Manually 
>> .. on the manual way.
>>> NIS/UNIX attribute uid=502 ????? I hope you mean 'uidNumber=502'
>> Yes of course, my fault, sorry. uidNumber=502 of course.
>> Mirco.
> OK, I have been taking a look at the webpage you posted and I am a bit 
> perplexed,  the cron line is this:
> */5 * * * * root  /usr/bin/rsync -XAavz --log-file 
> /var/log/sysvol-sync.log --delete-after -f"+ */" -f"- *" 
> /var/lib/samba/sysvol root at DC2:/var/lib/samba  && /usr/bin/unison  &> 
> /dev/null
> This, to me, means:
> every 5 minutes, the 'root' user, runs rsync and copies the directory  
> (and only the directory) '/var/lib/samba/sysvol' to '/var/lib/samba' 
> on the second DC. If this completes successfully, then root runs 
> unison to sync what is in '/var/lib/samba/sysvol'.
> This is what I cannot really understand, why use the rsync command at 
> all, as it would seem that unison uses rsync itself to do the copying, 
> why not just run unison alone to do everything, there is probably a 
> reason for it, but it escapes me.
> Also there is this line in the unison conf file:
> confirmbigdeletes=false
> After reading the unison manual, I think this should be 
> 'confirmbigdel=false'
> Try running the command manually in a terminal, without ' &> 
> /dev/null' on the end, you may get an error message
> Rowland
OK, I now understand why rsync is run first, it seems that unison 
doesn't use rsync for everything, without running rsync first, sysvol 
ends up belonging to 'root'.

After running the line against a test dir, all I can say is that it 
works for me.


More information about the samba mailing list