Bug 53438 - univention-samba4-backup fails since upgrade to UCS 5.0
univention-samba4-backup fails since upgrade to UCS 5.0
Status: NEW
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 5.0
amd64 Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-13 17:06 CEST by 9qwan3ncxsuh
Modified: 2021-09-16 11:24 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.343
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
steuwer: Patch_Available+


Attachments
A fix for the issue (707 bytes, patch)
2021-06-13 17:06 CEST, 9qwan3ncxsuh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 9qwan3ncxsuh 2021-06-13 17:06:26 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
Comment 1 Florian Best univentionstaff 2021-06-14 16:21:46 CEST
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.
Comment 2 9qwan3ncxsuh 2021-06-19 11:08:33 CEST
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.
Comment 4 Moritz Bunkus 2021-09-16 11:02:20 CEST
I've just created PR 21 with a fix for this bug: https://github.com/univention/univention-corporate-server/pull/21