Univention Bugzilla – Bug 53438
univention-samba4-backup fails since upgrade to UCS 5.0
Last modified: 2021-09-16 11:24:25 CEST
Created attachment 10748 [details]
A fix for the issue
Sice i updated my UCS to 5.0 the Backup with univention-samba4-backup /usr/sbin/univention-samba4-backup is not working anymore.
It fails with:
> tar: The following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly.
> tar: --exclude „smbd.tmp“ has no effect
> tar: --exclude „*.ldb“ has no effect
> tar: --exclude „*.tdb“ has no effect
> tar: Beende mit Fehlerstatus aufgrund vorheriger Fehler
run with bash -x the command is:
+ tar cjf /var/univention-backup/samba/samba4_private.2021-06-13.tar.bz2 ./private --exclude=smbd.tmp '--exclude=*.ldb' '--exclude=*.tdb' --warning=no-file-ignored --warning=no-file-changed --transform 's/.ldb.bak$/.ldb/' --transform 's/.tdb.bak$/.tdb/'
Change the order of Options and the Archive Path would resolve the issue. a possible patch is attached
Thank you for the feedback and the patch.
For the patch to be applied we need you to sign our CLA: https://www.univention.com/about-us/open-source/contributor-agreement/
If you create a pull request on github.com/univention/univention-corporate-server you can also sign the CLA electronically.
Thank you for your reply.
I would prefer if somebody with knowledge of the script would fix this. The attached fix doesn't work perfect.
> tar: Removing leading `/' from member names
> tar: /var/univention-backup/samba/samba4_private.2021-06-19.tar.bz2: Cannot stat: No such file or directory
> tar: Exiting with failure status due to previous errors
I'm sorry but by now i don't have the time to look in Detail to this for the next weeks and it should also be tested on new installations.
I've just created PR 21 with a fix for this bug: https://github.com/univention/univention-corporate-server/pull/21