Some times Samba will out-grow your server, sometimes its the easier upgrade path. Whatever the reason, Samba is super easy to move to a new server.
This document will show you how to take an existing Samba installation and then migrate that installation to a new server. This migration works across distributions (Ubuntu » Gentoo) and across platforms (32 » 64bits). The example servers are: ServerA - the source, with Samba 3.2 and ServerB the target with Samba 3.5.15
- Stop Samba Services
- Sync the File Shares
- Sync the configurations and run-time data
- New Server
Migrate the Data
Look for all relevant paths in the Samba configuration file (typically: /etc/samba/smb.conf
).
Then rsync each directory to the target server, this can be done while Samba is active.
This can take some time, depending on data size so get ready to wait.
This shell-script can help you along your way
for p in $(awk '/^[ \t]+path/ { print $3 }' /etc/samba/smb.conf) do rsync -a "$p/" "serverB:$p/" done
Migrate the Configuration
Pretty easy here, just rsync the /etc/samba directory from serverA to serverB.