Bug 14048 - General improvements for domain backup tool
Summary: General improvements for domain backup tool
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.9.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Tim Beale
QA Contact: Samba QA Contact
Depends on:
Reported: 2019-07-24 02:16 UTC by Tim Beale
Modified: 2020-11-18 00:47 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Beale 2019-07-24 02:16:50 UTC
There are some things that can be improved about the domain backup command. Raising this bug for backporting improvements to maintenance branches (where they'll be more use to users).

An example, lots of users seem to hit an error case where the DC being backed up hasn't initialized its RID pool. This wastes a lot of time (for them, waiting for an answer, and for the samba team that's doing the answering). E.g.

bin/samba-tool domain backup offline -s /tmp/join/etc/smb.conf --targetdir=/tmp/backup/
Creating targetdir /tmp/backup/...
ERROR(<class 'IndexError'>): uncaught exception - list index out of range
  File "bin/python/samba/netcmd/__init__.py", line 186, in _run
    return self.run(*args, **kwargs)
  File "bin/python/samba/netcmd/domain_backup.py", line 1019, in run
    sid = get_sid_for_restore(samdb)
  File "bin/python/samba/netcmd/domain_backup.py", line 81, in get_sid_for_restore
    rid = int(res[0].get('rIDNextRID')[0])
Comment 1 Andrew Bartlett 2020-11-18 00:47:55 UTC
Fixed by 9d2fd08249881702a4b4b881688d91576cc71ede in Samba 4.12 which is the most recent release in general maintenance.