Hello guys,
i hope this is the right place to report the bug in GNU tar i found
today. If not, please appologize this spam.
I'm testing incremental backups with tar-1.26-r1 and found that when I
restoring incremental update in conjunction with -C option tar do not
delete files which was restored by full backup but deleted in meantime.
Problem reproduction steps ( for clarification):
Creating test file/dir structure for backup:
mkdir backup
mkdir backup/dir1
mkdir backup/dir2
creating full backup:
tar -cvjpf backup0.tar.bz2 -g backup.tar.snar backup/
removing dir2 in meantime:
rmdir backup/dir2
Creating incremental backup:
tar -cvjpf backup1.tar.bz2 -g backup.tar.snar backup/
Restoring both backups:
mkdir restore
tar -xvjpf backup0.tar.bz2 -C restore/
tar -xvjpf backup1.tar.bz2 -g backup.tar.snar -C restore/
Check files in restore/ dir:
ls restore/
restore/:
backup
restore/backup:
dir1 dir2
Finally restoring incremental backup in restore/ dir does not delete dir2
for some reason.
As a workaround I am able to avoid using -C parameter and cd into
particular restore dir instead.
Contact me anytime for additional info - if needed.
Best Regards
Maros Zubko