Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
"tar" now restores incremental backup correctly
Previously, the "tar" command did not restore incremental backup correctly. Consequently, a file removed in the incremental backup was not removed when restoring. The bug has been fixed, and "tar" now restores incremental backup correctly.
Description of problem:
When RHEL7 tar restoring incremental backup, it doesn't remove a file that removed from previous backup.
Version-Release number of selected component (if applicable):
tar-1.26-29.el7
How reproducible:
Always
Steps to Reproduce:
1. Get files ready for archive.
# pwd
/var/tmp
# ls tmp
1.txt 2.txt
2. Creating a full backup archive.
# tar Jcfg file.tar.xz file.snar tmp
# tar Jtf file.tar.xz
tmp/
tmp/1.txt
tmp/2.txt
2. Creating an incremental backup archive.
# echo 3 > tmp/3.txt
# rm tmp/2.txt
# tar Jcfg file2.tar.xz file.snar tmp
3. Restore files from full backup archive.
# mkdir file
# tar JxfCg file.tar.xz ./file/ file.snar
# find file/
file/
file/tmp
file/tmp/1.txt
file/tmp/2.txt
4. Restore files from incremental backup archive.
# tar JxfCg file2.tar.xz file/ file.snar
Actual results:
RHEL7 tar does not remove file "2.txt".
# tar JxfCg file2.tar.xz file/ file.snar
# find file/
file/
file/tmp
file/tmp/1.txt
file/tmp/2.txt
file/tmp/3.txt
Expected results:
tar can remove file "2.txt" like RHEL6.
# tar JxfCg file2.tar.xz file/ file.snar
# find file/
file/
file/tmp
file/tmp/1.txt
file/tmp/3.txt
Thanks for the report and sorry for the delay. Yes, that was/is bug in
upstream release 1.26, fixed in 1.27 by upstream commit:
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=738fb9c2f44e
More concretely, it is a bug in -C option (not the first one relevant to *at()
change). You can work-around that by wrapping tar into 'cd file/' and 'cd -',
the following example should work for your concrete example:
Old command:
$ tar JxfCg file.tar.xz ./file/ file.snar
New cmomands:
$ cd file \
&& tar Jxfg ../file.tar.xz ../file.snar \
&& cd -
Pavel
I see the customer case is closed now, and I don't know whether this is still
expected to be fixed (and I'm considering closing this bug).
Was the workaround helpful so we don't need to have this fixed?
(In reply to Pavel Raiskup from comment #4)
> I see the customer case is closed now, and I don't know whether this is still
> expected to be fixed (and I'm considering closing this bug).
>
> Was the workaround helpful so we don't need to have this fixed?
IMHO we should fix this anyways, this is minimal effort as tar will have an erratum anyways, the patch is ready and there's complete reproducer available for QA
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2017:2012