Samba's LDB database files (such as sam.ldb used by the AD domain controller) are built on the TDB (Trivial Database) format. The tdbbackup tool creates a consistent copy of these files by locking the source database during the copy operation, which prevents the backup from capturing a partially-written or inconsistent state even while the database is actively in use by Samba. This is why Samba's own backup scripts rely on tdbbackup to safely back up .ldb and .tdb files.
Community Discussion