[Samba] Moving a DC...

Rowland penny rpenny at samba.org
Wed Dec 16 17:36:25 UTC 2020


On 16/12/2020 17:22, Marco Gaiarin via samba wrote:
> In my adventure with Samba/AD i've done the 'wrong thing', eg i've used
> a container (LXC) for DCs.
> Now i want to fix that, moving from LXC to a plain VM.
>
> OK, i can bring up a new set of DCs, join them, and then tear down the
> old.
This probably should work, only way to find out is to try it. Create a 
new VM and try and join it to your AD domain as a DC. If it works (and I 
can see no reason why it shouldn't) then transfer all the FSMO roles to 
the DC running in the VM, demote all the other DC's and shut them down, 
never to restart them.
> But because containers and VMs is both debian with Lois package, can i
> simply 'copy over' configuration files and 'var' files from the container
> to the VMs?
>
> I  think will suffices to copy:
>
> 	/etc/samba
> 	/etc/bind
> 	/etc/krb5.conf
> 	/etc/ntp.conf
> 	/etc/nsswitch.conf
> 	/var/lib/samba
> 	/var/spool/samba
> 	/var/log/samba

Whilst that 'may' work, you would have to clone everything else 
(hostname, ipaddress, etc) and will undoubtedly be fraught with numerous 
dangers, I would only attempt this as a last resort.

You could also try backing up the domain with the samba-tool backup 
tools and then restoring to a new DC in a VM.

Rowland





More information about the samba mailing list