[Samba] Online Backup failed....

samba at laurenz.ws samba at laurenz.ws
Mon Nov 20 14:34:19 UTC 2023


Full output: 

root at iob-master:~# samba-tool domain backup online --server=dc01
--targetdir=/autofs/backup/linux/samba_dom/$(hostname -d) -U administrator
Password for [SAMBA\administrator]:
INFO 2023-11-20 15:30:05,639 pid:73781
/usr/lib/python3/dist-packages/samba/join.py #1614: workgroup is SAMBA
INFO 2023-11-20 15:30:05,640 pid:73781
/usr/lib/python3/dist-packages/samba/join.py #1617: realm is
samba.laurenz.ws
Calling bare provision
INFO 2023-11-20 15:30:05,711 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2108: Looking up
IPv4 addresses
INFO 2023-11-20 15:30:05,712 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2125: Looking up
IPv6 addresses
WARNING 2023-11-20 15:30:05,712 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2132: No IPv6
address will be assigned
INFO 2023-11-20 15:30:06,267 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2274: Setting up
share.ldb
INFO 2023-11-20 15:30:06,443 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2278: Setting up
secrets.ldb
INFO 2023-11-20 15:30:06,621 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2283: Setting up
the registry
INFO 2023-11-20 15:30:07,269 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2286: Setting up
the privileges database
INFO 2023-11-20 15:30:07,495 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2289: Setting up
idmap db
INFO 2023-11-20 15:30:07,677 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2296: Setting up
SAM db
INFO 2023-11-20 15:30:07,782 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #880: Setting up
sam.ldb partitions and settings
INFO 2023-11-20 15:30:07,783 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #892: Setting up
sam.ldb rootDSE
INFO 2023-11-20 15:30:07,792 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #1305:
Pre-loading the Samba 4 and AD schema
Unable to determine the DomainSID, can not enforce uniqueness constraint on
local domainSIDs

INFO 2023-11-20 15:30:08,292 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2348: A Kerberos
configuration suitable for Samba AD has been generated at
/autofs/backup/linux/samba_dom/samba.laurenz.ws/tmpk87jfguz/private/krb5.con
f
INFO 2023-11-20 15:30:08,292 pid:73781
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2350: Merge the
contents of this file with your system krb5.conf or replace it with this
one. Do not create a symlink!
Provision OK for domain DN DC=samba,DC=laurenz,DC=ws
INFO 2023-11-20 15:30:08,307 pid:73781
/usr/lib/python3/dist-packages/samba/join.py #940: Starting replication
Using DS_BIND_GUID_W2K3
Schema-DN[CN=Schema,CN=Configuration,DC=samba,DC=laurenz,DC=ws]
objects[402/1550] linked_values[0/0]
Schema-DN[CN=Schema,CN=Configuration,DC=samba,DC=laurenz,DC=ws]
objects[804/1550] linked_values[0/0]
Schema-DN[CN=Schema,CN=Configuration,DC=samba,DC=laurenz,DC=ws]
objects[1206/1550] linked_values[0/0]
Schema-DN[CN=Schema,CN=Configuration,DC=samba,DC=laurenz,DC=ws]
objects[1550/1550] linked_values[0/0]
Analyze and apply schema objects
Partition[CN=Configuration,DC=samba,DC=laurenz,DC=ws] objects[402/1633]
linked_values[0/0]
Partition[CN=Configuration,DC=samba,DC=laurenz,DC=ws] objects[804/1633]
linked_values[0/0]
Partition[CN=Configuration,DC=samba,DC=laurenz,DC=ws] objects[1206/1633]
linked_values[0/0]
Partition[CN=Configuration,DC=samba,DC=laurenz,DC=ws] objects[1608/1633]
linked_values[0/0]
Partition[CN=Configuration,DC=samba,DC=laurenz,DC=ws] objects[1633/1633]
linked_values[27/27]
Replicating critical objects from the base DN of the domain
Partition[DC=samba,DC=laurenz,DC=ws] objects[97/97] linked_values[30/30]
Partition[DC=samba,DC=laurenz,DC=ws] objects[341/341] linked_values[30/30]
../../lib/ldb/ldb_key_value/ldb_kv_index.c:2972: duplicate attribute value
in CN=W7TEST,CN=Computers,DC=samba,DC=laurenz,DC=ws for index on
servicePrincipalName, duplicate of objectGUID
9798a295-7322-44e9-a65a-f756f7f484fe in
@INDEX:SERVICEPRINCIPALNAME:TERMSRV/W7TEST.SAMBA.LAURENZ.WS
../../lib/ldb/ldb_key_value/ldb_kv_index.c:2972: duplicate attribute value
in CN=W10TEST,CN=Computers,DC=samba,DC=laurenz,DC=ws for index on
servicePrincipalName, duplicate of
objectGUID d7bdeb3d-be13-480d-b855-aef5721554e0 in
@INDEX:SERVICEPRINCIPALNAME:TERMSRV/W10TEST.SAMBA.LAURENZ.WS
../../lib/ldb/ldb_key_value/ldb_kv_index.c:2972: duplicate attribute value
in CN=JD01,CN=Computers,DC=samba,DC=laurenz,DC=ws for index on
servicePrincipalName, duplicate of objectGUID
d407be8e-f72d-46fa-893f-f3a56ecf9ada in
@INDEX:SERVICEPRINCIPALNAME:TERMSRV/JD01.SAMBA.LAURENZ.WS
Done with always replicated NC (base, config, schema)
Replicating DC=DomainDnsZones,DC=samba,DC=laurenz,DC=ws
Partition[DC=DomainDnsZones,DC=samba,DC=laurenz,DC=ws] objects[169/169]
linked_values[0/0]
Replicating DC=ForestDnsZones,DC=samba,DC=laurenz,DC=ws
Partition[DC=ForestDnsZones,DC=samba,DC=laurenz,DC=ws] objects[24/24]
linked_values[0/0]
INFO 2023-11-20 15:30:27,383 pid:73781
/usr/lib/python3/dist-packages/samba/join.py #1060: Committing SAM database
- this may take some time
Repacking database from v1 to v2 format (first record
CN=ms-DFSR-Options2,CN=Schema,CN=Configuration,DC=samba,DC=laurenz,DC=ws)
Repack: re-packed 10000 records so far
Repacking database from v1 to v2 format (first record
CN=IntellimirrorSCP-Display,CN=411,CN=DisplaySpecifiers,CN=Configuration,DC=
samba,DC=laurenz,DC=ws)
Repacking database from v1 to v2 format (first record
DC=io-test,DC=samba.laurenz.ws,CN=MicrosoftDNS,DC=DomainDnsZones,DC=samba,DC
=laurenz,DC=ws)
Repacking database from v1 to v2 format (first record
DC=_ldap._tcp.Default-First-Site-Name._sites.gc,DC=_msdcs.samba.laurenz.ws,C
N=MicrosoftDNS,DC=ForestDnsZones,DC=samba,DC=laurenz,DC=ws)
Repacking database from v1 to v2 format (first record
CN=samba,CN=rpc,CN=ypServ30,CN=RpcServices,CN=System,DC=samba,DC=laurenz,DC=
ws)
INFO 2023-11-20 15:30:34,355 pid:73781
/usr/lib/python3/dist-packages/samba/join.py #1080: Committed SAM database
INFO 2023-11-20 15:30:34,367 pid:73781
/usr/lib/python3/dist-packages/samba/join.py #1655: Setting isSynchronized
and dsServiceName
INFO 2023-11-20 15:30:34,419 pid:73781
/usr/lib/python3/dist-packages/samba/join.py #1620: Cloned domain SAMBA (SID
S-1-5-21-4127083392-2923695558-1708149541)
INFO 2023-11-20 15:30:35,440 pid:73781
/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py #277: Backing
up sysvol files (via SMB)...
INFO 2023-11-20 15:31:41,249 pid:73781
/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py #138: Creating
backup file
/autofs/backup/linux/samba_dom/samba.laurenz.ws/samba-backup-samba.laurenz.w
s-2023-11-20T15-31-40.887394.tar.bz2...
ERROR(<class 'OSError'>): uncaught exception - [Errno 39] Directory not
empty: 'sam.ldb.d'
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185,
in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line
303, in run
    shutil.rmtree(tmpdir)
  File "/usr/lib/python3.9/shutil.py", line 718, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/lib/python3.9/shutil.py", line 659, in _rmtree_safe_fd
    onerror(os.rmdir, fullname, sys.exc_info())
  File "/usr/lib/python3.9/shutil.py", line 657, in _rmtree_safe_fd
    os.rmdir(entry.name, dir_fd=topfd)

-----Ursprüngliche Nachricht-----
Von: samba at laurenz.ws <samba at laurenz.ws> 
Gesendet: Montag, 20. November 2023 15:34
An: 'samba at lists.samba.org' <samba at lists.samba.org>
Betreff: AW: [Samba] Online Backup failed....

Same problem:

ERROR(<class 'OSError'>): uncaught exception - [Errno 39] Directory not
empty: 'sam.ldb.d'
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185,
in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain_backup.py", line
303, in run
    shutil.rmtree(tmpdir)
  File "/usr/lib/python3.9/shutil.py", line 718, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/lib/python3.9/shutil.py", line 659, in _rmtree_safe_fd
    onerror(os.rmdir, fullname, sys.exc_info())
  File "/usr/lib/python3.9/shutil.py", line 657, in _rmtree_safe_fd
    os.rmdir(entry.name, dir_fd=topfd)

-----Ursprüngliche Nachricht-----
Von: samba at laurenz.ws <samba at laurenz.ws>
Gesendet: Montag, 20. November 2023 15:28
An: 'samba at laurenz.ws' <samba at laurenz.ws>; 'samba at lists.samba.org'
<samba at lists.samba.org>
Betreff: AW: [Samba] Online Backup failed....

Tried your directory - same outcome.... - I try from a member server now


-----Ursprüngliche Nachricht-----
Von: samba <samba-bounces at lists.samba.org> Im Auftrag von Dirk Laurenz via
samba
Gesendet: Montag, 20. November 2023 15:06
An: samba at lists.samba.org
Betreff: Re: [Samba] Online Backup failed....

Hey,

dir exisit....

root at dc01:/autofs/backup# ls -la /autofs/backup/linux/samba_dom/backup.tgz/
insgesamt 12484
drwxr-xr-x 4 root root     4096 20. Nov 14:02 .
drwxr-xr-x 3 root root     4096 20. Nov 14:00 ..
-rw-r--r-- 1 root root 12765535 20. Nov 14:03
samba-backup-samba.laurenz.ws-2023-11-20T14-02-51.306281.tar.bz2
drwx------ 2 root root     4096 20. Nov 14:00 tmpdz6serc_
drwx------ 7 root root     4096 20. Nov 14:03 tmpwvnkjtkp

why member? 

-----Ursprüngliche Nachricht-----
Von: samba <samba-bounces at lists.samba.org> Im Auftrag von Rowland Penny via
samba
Gesendet: Montag, 20. November 2023 14:48
An: samba at lists.samba.org
Cc: Rowland Penny <rpenny at samba.org>
Betreff: Re: [Samba] Online Backup failed....

On Mon, 20 Nov 2023 14:21:53 +0100
Dirk Laurenz via samba <samba at lists.samba.org> wrote:

> Hello everybody,
> 
>  
> 
> i tried "samba-tool domain backup online --server=dc01 
> --targetdir=/autofs/backup/linux/samba_dom/backup.tgz -U 
> administrator"

Does the /autofs/backup/linux/samba_dom/backup.tgz directory actually exist
?
To me it looks like a compressed file.

I have a script that runs every hour to backup my domain and it uses
this:

samba-tool domain backup online -N --server="$PDCe"
--targetdir=/srv/backups/$(hostname -d) --use-krb5-ccache=/tmp/backup_cc

and I end up with the directory /srv/backups/samdom.example.com full of
files like this:

samba-backup-samdom.example.com-2023-11-20T12-45-15.011687.tar.bz2

I suppose I should also say that I run the script on a Unix domain member
and not on the DC.

Rowland


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba




More information about the samba mailing list