[Samba] samba-tool domain backup offline fails

Andrew Bartlett abartlet at samba.org
Wed Apr 7 08:49:09 UTC 2021


On Wed, 2021-04-07 at 10:22 +0200, Stefan Bellon via samba wrote:
> Hi all,
> 
> I'm about to set up disaster recovery for the domain and followed
> https://wiki.samba.org/index.php/Back_up_and_Restoring_a_Samba_AD_DC
> (as I am using Samba 4.13.5).
> 
> First I went for the online backup (which works), but AFAICS it requires
> administrator authentication and is thus not really suited for
> automated backups via a cronjob.
> 
> When I tried "samba-tool domain backup offline" however, this fails:
> 
> module samba_dsdb initialization failed : Operations error
> Unable to load modules for /var/lib/samba/bind-dns/dns/sam.ldb: partition_metadata: Migrating partition metadata: create of metadata.tdb gave: partition_metadata: Unable to create /var/lib/samba/bind-dns/dns/sam.ldb.d/metadata.tdb: Device or resource busy
> 
> ERROR(ldb): uncaught exception - partition_metadata: Migrating partition metadata: create of metadata.tdb gave: partition_metadata: Unable to create /var/lib/samba/bind-dns/dns/sam.ldb.d/metadata.tdb: Device or resource busy
> 
>   File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 186, in _run
>     return self.run(*args, **kwargs)
>   File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line 1082, in run
>     ldb_obj = Ldb(path, lp=lp)
>   File "/usr/lib/python3/dist-packages/samba/__init__.py", line 115, in __init__
>     self.connect(url, flags, options)
> 
> The wiki says:
> 
>   Note that despite this option's name, the DC does not actually need to
>   be offline when running this command
> 
> Is that still true? Should I be doing it differently?

This is still true, your issue is just a bug, see 

https://bugzilla.samba.org/show_bug.cgi?id=14027

Sorry for the trouble, we hope our backup tooling will have a few less
edges shortly, thanks to the tireless work of Joseph Sutton who joined
my team at Catalyst recently.

Andrew Bartlett


-- 
Andrew Bartlett (he/him)        https://samba.org/~abartlet/
Samba Team Member (since 2001)  https://samba.org
Samba Developer, Catalyst IT    https://catalyst.net.nz/services/samba





More information about the samba mailing list