[Samba] samba-backup.sh problems - is the /var/lib/samba/etc folder essential in a Samba installation?
Stephen
stephen at ogdenradar.com
Tue Apr 16 13:35:46 UTC 2019
Hi everyone, I am running Samba 4.5.16-Debian on Raspbian OS and I am
currently attempting to deploy the provided samba-backup.sh script
within my existing SAMBA installation to implement disaster recovery on
my AD DC servers.
Following the documentation provided here
https://wiki.samba.org/index.php/Using_the_samba_backup_script I have so
far managed a partial success on my backup:
pi at ad1:~ $ sudo /usr/sbin/samba_backup.sh
tar: ./private: file changed as we read it
tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
Error while archiving /usr/local/backups/etc.2019-04-16.tar.bz2 - status = 2
The script aborts with status 2 which is apparently an unrecoverable
fatal error. If I now do a quick ls we can examine what the script did
manage to backup prior to it failing:
pi at ad1:~ $ sudo ls /usr/local/backups
samba4_private.2019-04-16.tar.bz2
So we can see that at least ONE of the THREE expected archives has been
created which is a good start. When I examine samba_backup.sh I notice
the following line in the script DIRS="private etc sysvol" which appears
to just be a list of all the directories within /var/lib/samba to
include within the backup. However when I do a quick ls, I notice am
completely lacking the specified etc directory within my Samba
installation - this is why the backup appears to be failing. The folder
/var/lib/samba/etc doesn't exist on my machine:
pi at ad1:~ $ sudo ls /var/lib/samba
account_policy.tdb group_mapping.tdb ntp_signd printers private
registry.tdb share_info.tdb sysvol usershares winbindd_cache.tdb
winbindd_privileged
So my questions are:
1) Should /var/lib/samba/etc folder exist in my installation? Should I
worry that my installation botched since I appear to be missing it.
2) Related to 1, does /var/lib/samba/etc actually exist, perhaps the
Debian/Raspbian packagers have moved it somewhere else? Alternatively it
may be that the etc folder is actually optional and created on demand
as needed?
3) Related to points 1 and 2 - Is it absolutely essential to include the
contents of /var/lib/samba/etc in order to have a viable AD DC backup
set (as per the current Samba docs)? If not I am just tempted to solve
the problem by editing the aforementioned DIRS statement in order to to
skip the backup on the etc folder since it doesn't exist on my machine.
Kind Regards
Stephen Ellwood
More information about the samba
mailing list