[Samba] How to move a Samba4 installation from one folder to another

Andrew Bartlett abartlet at samba.org
Wed May 25 10:39:27 UTC 2016


On Mon, 2016-05-16 at 14:45 +0200, Julian Timm wrote:
> Hi!
> 
> We have used Samba 4.1 as an AD-DC for a long time. Our installation
> based on Ubuntu 12.04 and Zentyal 3.2 Samba packages.
> Now we want to upgrade to Ubuntu 14.04 and a newer Samba version
> (latest Ubuntu Version is 4.3.9). The problem is, that
> Zentyal 3.2 has used /opt/samba4 as installation path before, but all
> new Samba 4 versions are installed to /var/lib/samba now. 
> How can we migrate our Samba 4 installation from /opt/samba4 to
> /var/lib/samba? Simply move the Samba directory and change the bind9
> configuration does not work at all. We use Samba also as a print
> server and after moving the samba directory all printers and printer
> drivers are not shown anymore in the Windows printer administration
> tool.
> 
> Can anybody help us to migrate our Samba installation?
> Thx

In a test VM, just re-provision Samba, then learning from where that
puts the files, move the files to the new correct locations.  Finish
with a samba_upgradedns --dns-backend=BIND9_DLZ to fix the hard links.

Or do the reverse, by setting the various paths in the 'new' smb.conf
to point at your old installation directories. 

The most critical paths are 'private dir' and what [netlogon] and
[sysvol] point at, but of course there are other persistent tdbs like
printing that may matter on a site-to-site basis.

I hope this helps.

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba mailing list