sysvol replication in samba4?

Jeff Sadowski jeff.sadowski at gmail.com
Thu Sep 29 07:25:32 MDT 2011


On Thu, Sep 29, 2011 at 12:59 AM, Daniele Dario <d.dario76 at gmail.com> wrote:
> On Mon, 2011-09-26 at 16:56 -0600, Jeff Sadowski wrote:
>> On Thu, Sep 22, 2011 at 7:30 PM, Matthieu Patou <mat at samba.org> wrote:
>> > On 22/09/2011 15:04, simo wrote:
>> >>
>> >> On Thu, 2011-09-22 at 13:33 -0600, Jeff Sadowski wrote:
>> >>>
>> >>> I created a samba4 domain controller the other day and sysvol seems
>> >>> not to replicate on its own. What do I need to do to start the
>> >>> replication process?
>> >>
>> >> Wait until the replication protocol has been implemented.
>> >
>> > In the mean time use a rsync + csync script to do the replication for you.
>> >
>> > I can post soon the script I'm using to do this job.
>> >
>> > it's not 100% perfect but still quite ok.
>> >
>>
>> I'd like to see your script
>>
>>
>> my script looks as follows
>> <----- start of script
>> #!/bin/bash
>> testmount=`mount | grep /mnt/sysvol`
>> if [ "${testmount}" = "" ]; then
>>  mount /mnt/sysvol
>>  sleep 5
>>  testmount=`mount | grep /mnt/sysvol`
>>  if [ "${testmount}" = "" ]; then
>>   echo could not mount /mnt/sysvol
>>   exit
>>  fi
>> fi
>> rsync -ra /mnt/sysvol/ /usr/local/samba/var/locks/sysvol
>> <-------- end of script
>> and I have it in crontab as follows
>> * * * * * /root/sync_sysvol
>>
>> > --
>> > Matthieu Patou
>> > Samba Team
>> > http://samba.org
>> >
>> >
>
> I don't understand: does the above script mount sysvol (using fstab)?
> You don't need to mount the sysvol share to be able to sync it.

Yes

>
> For example let's say that we have these 2 DCs: PDC and BDC.
> In PDC's rsyncd.conf we will have this entry
> ...
> [sysvol]
>        path = /usr/local/samba/var/locks/sysvol
> ...
>
> than from BDC we can run:
> # rsync -ar remote_user at bdc::sysvol /usr/local/samba/var/locks/sysvol
>
> where remote_user is a user allowed to login to pdc through ssh (best if
> you share the key between servers)
>

problem is there is no ssh on the windows server where the original sysvol is.
Hence why I mount it first.

> Daniele.
>
>
>


More information about the samba-technical mailing list