On Mon, Jul 06, 2020 at 19:39:49 +0200, Stefan G. Weichinger wrote:
> I see stuff like this in my amanda-backups when I use the
> amsamba-application (amanda-3.5.1, Debian 10.4, samba-4.10.15):
>
> sendbackup: info BACKUP=APPLICATION
> sendbackup: info APPLICATION=amsamba
> sendbackup: info RECOVER_CMD=/bin/gzip -dc
> |/usr/lib/amanda/application/amsamba restore [./file-to-restore]+
> sendbackup: info COMPRESS_SUFFIX=.gz
> sendbackup: info end
> ? smbclient: cli_setatr failed: NT_STATUS_ACCESS_DENIED
> ? smbclient: cli_setatr failed: NT_STATUS_ACCESS_DENIED
>
> [..]
>
> Unfortunately even the log files in
> /var/log/amanda/log.error don't show more details.
A little bit of additional information should be found in the
/var/log/amanda/client/<CONFIG>/Amsamba.<DATETIMESTAMP.debug
file.
(This will be on the machine which is listed in the "Hostname" [i.e.
first] column of the disklist file -- that's the machine where "amsamba"
runs.)
> The user in /etc/amandapass has admin rights on the files in the DLE (at
> least I am told so).
>
> Maybe it's "only" setting the archive bit that fails?
If you count the number of NT_STATUS_ACCESS_DENIED errors in a
particular
/var/log/amanda/log.error/<CLIENTHOST>.<DLE>.<LVL>.<DATETIMESTAMP>.errout
file and it exactly matches the number of files backed up in that run
(e.g. as determined by a count of lines in the corresponding
/var/lib/amanda/<CONFIG>/index/<CLIENTHOST>/__<SAMBAHOST>_<SHARE>/<DATETIME>_<LVL>-unsorted.gz
file ), then it seems likely to be the archive bit permissions.
(Another symptom pointing in that direction is if incremental dumps for
that Samba DLE are the same size as full dumps even when you know that
most files would not have been changed since the previous full dump.)
To test explicitly, you can do a manual smbclient test, something like
this:
$ USER=<SMBUSER> smbclient //path-to-share -E -W <WORKGROUP> -c "cd
<SMALL-TEST-DIR>; tarmod full reset hidden system quiet; tar c -" >
smbclient_test.tar
to try to backup the remote test directory into the local
smbclient_test.tar file using the same smbclient "tar" settings that
Amanda uses....
(Also, the smbclient "ls" command shows you a flag of "A" or "N" on a
file, so you can use that to ocnfirm that the smbclient tar command is
successfully clearing the Archive bit.)
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239