[Samba] samba 4.13: backup script: FileNotFoundError
Andrew Bartlett
abartlet at samba.org
Mon Nov 22 09:23:35 UTC 2021
On Mon, 2021-11-22 at 08:36 +0000, James Dingwall via samba wrote:
> Hi,
>
> Ubuntu 20.04 recently updated samba from 4.11 to 4.13. Since then
> the backup
> script has started failing:
>
> running backup on dirs: /var/lib/samba/private /var/lib/samba
> /etc/samba
> ERROR(<class 'FileNotFoundError'>): uncaught exception - [Errno 2] No
> such file or directory: '/var/lib/samba/dfs/netlogon'
> File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py",
> line 186, in _run
> return self.run(*args, **kwargs)
> File "/usr/lib/python3/dist-
> packages/samba/netcmd/domain_backup.py", line 1105, in run
> if any(os.path.samefile(full_path, file) for file in all_files):
> File "/usr/lib/python3/dist-
> packages/samba/netcmd/domain_backup.py", line 1105, in <genexpr>
> if any(os.path.samefile(full_path, file) for file in all_files):
> File "/usr/lib/python3.8/genericpath.py", line 100, in samefile
> s1 = os.stat(f1)
>
> Assuming that I set my DFS up correctly I think the cause is that
> 'netlogon'
> is a dangling link:
>
> $ ls -l /var/lib/samba/dfs/netlogon
> lrwxrwxrwx 1 root root 43 Mar 26 2021 /var/lib/samba/dfs/netlogon ->
> msdfs:dc0\netlogon,dc1\netlogon
>
> Should the directory backup script handle this case or should I move
> the [dfs]
> share?
Ideally it would handle this case. This regression was triggered by a
fix for issues with hard links.
However in general [sysvol] and [netlogon] should be real shares with
the sync occouring server-side, not by forcing the client to a
particular DC, as otherwise you don't have redundency. (However, the
issue of how to sync and ensuring updates happen on the right DC is
problemtatic).
Andrew Bartlett
--
Andrew Bartlett (he/him) https://samba.org/~abartlet/
Samba Team Member (since 2001) https://samba.org
Samba Team Lead, Catalyst IT https://catalyst.net.nz/services/samba
Samba Development and Support, Catalyst IT - Expert Open Source
Solutions
More information about the samba
mailing list