[Samba] Online Backup failed....

Andrew Bartlett abartlet at samba.org
Mon Nov 20 20:48:53 UTC 2023


On Mon, 2023-11-20 at 15:34 +0100, Dirk Laurenz via samba wrote:
> /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)

This is an interesting failure.  rmtree is mean to to remove everything
regardless, so what is remaining in the not-empty directory?

Is there an immutable file somehow?

Does a shell 'rm -rf' work on that directory?

The logs indicate it got as far as putting files into the backup, it is
possible all the files were added, or otherwise that there was a
failure adding some file, we can't tell from the logs which.

It is a long shot, but consider/rule out filesystem corruption - run
the backup on another filesystem perhaps?

Andrew Bartlett

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

Proudly developing Samba for Catalyst.Net Ltd - a Catalyst IT group
company

Samba Development and Support: https://catalyst.net.nz/services/samba

Catalyst IT - Expert Open Source Solutions






More information about the samba mailing list