[Samba] Backup Error

Tim Beale timbeale at catalyst.net.nz
Mon Jul 22 21:08:41 UTC 2019

On 23/07/19 8:05 AM, Robert A Wooldridge via samba wrote:
> I'm trying to do a backup of my DC and I get this error:
> samba-tool domain backup online --server=athena --targetdir=/opt
> ERROR(<type 'exceptions.IndexError'>): uncaught exception - list index
> out of range
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py",
> line 177, in _run
>     return self.run(*args, **kwargs)
>   File
> "/usr/lib/python2.7/dist-packages/samba/netcmd/domain_backup.py", line
> 237, in run
>     new_sid = get_sid_for_restore(remote_sam)
>   File
> "/usr/lib/python2.7/dist-packages/samba/netcmd/domain_backup.py", line
> 73, in get_sid_for_restore
>     rid = int(res[0].get('rIDNextRID')[0])
This happens when you try to back up a DC that hasn't initialized its
RID pool yet.

I thought it was just a corner-case that only happens if you try to
backup a brand new DC. But it appears the same thing can happen if all
the RID allocations have taken place on the primary DC and you try to
back up the secondary DC.

The solution would be either:
- backup your primary DC rather than the secondary one.
- Create and then delete a temporary user directly on the secondary DC
to force a RID allocation. Then the backup should then work on the
secondary DC.

More information about the samba mailing list