1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-20 16:23:51 +03:00

samba-tool domain backup: Use tdbbackup on metadata.tdb

metadata.tdb is inside sam.ldb.d/ but should be backed up with tdbbackup.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug 24 13:22:04 UTC 2021 on sn-devel-184
This commit is contained in:
Andrew Bartlett
2021-08-23 20:45:50 +12:00
committed by Andreas Schneider
parent 958931ad37
commit 78942ad7d1

View File

@@ -1048,6 +1048,9 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
if sam_file.endswith('.ldb'):
logger.info(' backing up locked/related file ' + sam_file)
copy_function(sam_file)
elif sam_file.endswith('.tdb'):
logger.info(' tdbbackup of locked/related file ' + sam_file)
self.offline_tdb_copy(sam_file)
else:
logger.info(' copying locked/related file ' + sam_file)
shutil.copyfile(sam_file, sam_file + self.backup_ext)