[Samba] samba 4.9.7 - DC online backup error - "uncaught exception - 'TarFile' object has no attribute '__exit__'"
Rowland penny
rpenny at samba.org
Fri Mar 19 12:07:39 UTC 2021
On 18/03/2021 19:27, Carlos Gardel via samba wrote:
> Hi,
>
> I've been running two DC:s (DC1 and DC2) in a pure samba AD domain since 2015 on Centos 6. Starting with version 4.1.14 I have upgraded my way to version 4.9.7. It seems I have now reached the limit for possible upgrades of these DC:s since it is no longer possible to upgrade to 4.10 on Centos 6.
>
> I'm now preparing to deploy a DC3 on a Centos 8 vm with samba 4.14.0. Before joining it to the domain I have tried to make an online backup of the AD on the two existing DC:s following the guide at https://wiki.samba.org/index.php/Back_up_and_Restoring_a_Samba_AD_DC.
>
> When I run the command (as root) "samba-tool domain backup online --targetdir=/root/samba-backup/ --server=DC2 -UAdministrator" I get the following error:
>
> ERROR(<type 'exceptions.AttributeError'>): uncaught exception - 'TarFile' object has no attribute '__exit__'
> File "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py", line 178, in _run
> return self.run(*args, **kwargs)
> File "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain_backup.py", line 243, in run
> backup_online(smb_conn, sysvol_tar, remote_sam.get_domain_sid())
> File "/usr/local/samba/lib64/python2.6/site-packages/samba/ntacls.py", line 502, in backup_online
> with tarfile.open(name=dest_tarfile_path, mode='w:gz') as tar:
> [root at dc2 samba-backup]#
>
> Does anybody know if this can be fixed? It looks like the problem is python 2.6?
>
> I would be very grateful for all the help I can get since it would feel fantastic to be able to perform a backup before I start to join new DC:s and make changes to the existing setup.
>
> Best regards,
> Carlos
>
You need python 2.7 at least, not being a Centos user, is it possible to
upgrade Python ?
Rowland
More information about the samba
mailing list