[PATCH: Offline Backup]

Andrew Bartlett abartlet at samba.org
Sun Jul 29 22:06:02 UTC 2018


On Wed, 2018-07-25 at 16:50 +1200, Aaron Haslett via samba-technical
wrote:
> The samba_backup bash script is a tool that creates a local backup of a
> DC using the file system.  This patch replaces that script with a new
> samba-tool command called "domain backup offline".
> 
> If the samba_backup bash script is used on a DC while it is running,
> there could be database corruption.  This patch adds readonly locking
> mode to the tdbbackup tool and uses the new functionality to do a safe
> backup.  Thorough testing is added, including a new testenv target
> constructed from a backup created by the new tool.  The new target is
> tagged against all the same tests as the existing 'backup online' and
> 'rename' targets.

G'Day Aaron,

A few initial comments:

Sadly the patches don't apply to current master for me, so I wasn't
able to test it out, so please see what is up with that.

[PATCH 1/7] tdb: adding readonly locks mode to tdbbackup tool

Please explain in the commit that the script holds a transaction lock
in the calling process. 

[PATCH 2/7] tdb: test for readonly locks mode on tdbbackup command

The tdbbackup tests need to be in lib/tdb and part of the lib/tdb 'make
test', and should confirm that the backup is the same as the original
DB, eg via a tdbdump of both the original and .bak databases.

[PATCH 4/7] netcmd: domain backup offline command

Please find the text I wrote for Tim explaining that EINVAL relates to
mutex-locked temporary databases that can be ignored. 

Otherwise this looks good, and I thank you for your patience on this
effort. 

Thanks,

Andrew Bartlett

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







More information about the samba-technical mailing list