Problem: Daily messages include : tar: --exclude 'x' has no effect

Problem

After upgrading from 4.4.8 to 5.0 we get daily messages like:

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: Exiting with failure status due to previous errors Error while archiving /var/univention-backup/samba/samba4_private.2021-10-28.tar.bz2 - status = 2

Investigation

With view +151 /usr/sbin/univention-samba4-backup you can see code like:

tar cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 $relativedirname \

This is a known bug

Solution

As you can see in the Bug description remove $relativedirname from line 151:
image
Add it to line 159 or below the last --transform:
image

  • Don’t forget a linebreak in 158 :sweat_smile:
  • Please keep in Mind the check the script after updating system, till the bug is fixed.

Please be aware the bug is fixed in 5.0

This topic was automatically closed after 24 hours. New replies are no longer allowed.

Mastodon