Univention Bugzilla – Bug 53438
univention-samba4-backup fails since upgrade to UCS 5.0
Last modified: 2023-08-30 11:59:48 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
ucs-test fix: 10.0.6-73A~5.0.0.202111181003 univention-samba4 fix: 9.0.6-6A~5.0.0.202111181025 univention-samba4.yaml b575ace649e6 | Bug #53438: Fixed error while executing tar command for samba4 backup univention-samba4 (9.0.6-6) b575ace649e6 | Bug #53438: Fixed error while executing tar command for samba4 backup ucs-test.yaml 008cbd913935 | Bug #53438: Updated YAML ae5d43339e5e | Bug #53438: Added test for samba4 backup script. ucs-test (10.0.6-73) ae5d43339e5e | Bug #53438: Added test for samba4 backup script.
package install: OK univention-samba-backup works: OK Test: OK Test successful: OK Verified
<https://errata.software-univention.de/#/?erratum=5.0x159>
*** Bug 53729 has been marked as a duplicate of this bug. ***