Stephen
2020-Feb-20 16:27 UTC
[Samba] Recommended backup procedure for standalone samba file server configuration?
Hi everyone, I am running Ubuntu 18.04 Bionic with Samba version 4.7.6-Ubuntu. *Background / Problem Context* I have recently setup a server where I wish to use a standalone Samba file server in conjunction with SVN and git and then have all these services share the same username and password credentials. I wish to achieve this without using any centralised LDAP or Active Directory or similar nameservices for the time being. My overall approach is very simple - I basically have a script I call ie # ./create_new_user.sh dave engineer This then creates a linux and samba user account for the new user, a home folder, and creates accounts in apache2 to allow subversion and git access and generally performs all the relevant configuration for the new user account. *My Question* So far this all works great, but I have a problem when it comes to backups. I need to be able to backup not just the data on my fileserver (easy!) but also the full samba user configuration (harder!). This is to ensure that if I ever need to restore a backup I not only have my original data but also crucially the exact same usernames and corresponding passwords as previously so samba file sharing service can resume essentially uninterrupted for my users after the restore. Unfortunately I couldn't find any official Samba documentation describing a recommended way to do this for the specific case of a STANDALONE samba file server. I am aware that samba provides official tools for backing up the user configuration of a DC, but how can I achieve similar results for a standalone file server? In the absense of any official guidance I managed to achieve a successful backup myself by just tarring up the /etc/samba and /var/lib/samba folders on my server and then later restoring these archives to their original locations. Obviously my way is crude and unofficial! Is there an officially supported and/or recommended method and tools to achieve my aims here? Or should I just carry on using my tar files manually as I have described? Kind Regards Stephen Ellwood-- Stephen Ellwood, Embedded System Engineer, Ogden Safety Systems Ltd, Unit 6, Cliffe Park Way, Bruntcliffe Road, Morley, Leeds, LS27 0RY, UK. Tel: +44 (0)1937 835395 Email: stephen at ogdenradar.com URL: www.ogdenradar.com
Andrew Bartlett
2020-Feb-20 17:45 UTC
[Samba] Recommended backup procedure for standalone samba file server configuration?
On Thu, 2020-02-20 at 16:27 +0000, Stephen via samba wrote:> > Unfortunately I couldn't find any official Samba documentation > describing a recommended way to do this for the specific case of a > STANDALONE samba file server. I am aware that samba provides official > tools for backing up the user configuration of a DC, but how can I > achieve similar results for a standalone file server? > > In the absense of any official guidance I managed to achieve a > successful backup myself by just tarring up the /etc/samba and > /var/lib/samba folders on my server and then later restoring these > archives to their original locations. > > Obviously my way is crude and unofficial! Is there an officially > supported and/or recommended method and tools to achieve my aims here? > Or should I just carry on using my tar files manually as I have described?When taking copies of tdb files, use tdbbackup to do so safely (eg locked). 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
Seemingly Similar Threads
- Disabling password expiry for a AD service account for accessing LDAPS, and security best practices.
- Incorrect Example in Samba User Management Documentation
- wbinfo isn't working on domain member
- Disabling password expiry for a AD service account for accessing LDAPS, and security best practices.
- Disabling password expiry for a AD service account for accessing LDAPS, and security best practices.