MAILTO:[email protected]

Subject: BUG report: GNU tar 1.23 can't create incremental backups on '/'
dir

Tar version affected:
root@host2 ~]# tar --version
tar (GNU tar) 1.23

Systems affected:
(1) Linux host1 2.6.32-71.el6.i686 #1 SMP Fri Nov 12 04:17:17 GMT 2010 i686
i686 i386 GNU/Linux
(2) Linux host2 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST
2011 x86_64 x86_64 x86_64 GNU/Linux


Hello bugreport,

Our house-made backup program can't create incremental backups any longer
when we moved to CentOS 6, GNU tar 1.23.
Both 32-bit and 64-bit CentOS6 systems have the problem.

You should be able to repeat the problem using the following sequence:

Backup server contacts client's root user via passphrase-less RSA key :

When running the following program the first time, you'll get an initial
VALID FULL backup of the client,
when run for the second time, you'll get a INCREMENTAL backup of size 0.

[root@bupsrv ~]# cat showbug.sh
#!/bin/bash -u
CLIENTIP=$1
DATESTAMP=$(date +"%s")
ssh -v CLIENTIP "tar -cf - --listed-incremental=/var/log/meta_files.snar /
--exclude /var/lib/mysql --exclude /var/tmp --exclude /dev --exclude /proc
--exclude /sys --exclude /mnt " > backup.$1.${DATESTAMP}.tar


Note that the backup WILL succeed as long as you don't use the '/' as the
base (for example: /var/log).
I suppose something has changed since version GNU tar 1.15.1.
The following program WILL work:

[root@bupsrv ~]# cat noproblem.sh
#!/bin/bash -u
CLIENTIP=$1
DATESTAMP=$(date +"%s")
ssh -v CLIENTIP "tar -cf - --listed-incremental=/var/log/meta_files.snar
/var/log --exclude /var/lib/mysql --exclude /var/tmp --exclude /dev
--exclude /proc --exclude /sys --exclude /mnt " > backup.$1.${DATESTAMP}.tar


I would guess the code has changed where the removing of the leading slash
is handled, maybe a TRAILING slash is removed in any case, and there isn't a
special case for when the parameter is '/'.

Thanks,

Michel van Gruijthuijsen
[email protected]
Sysadmin and Poker player :)

Reply via email to