helpGNU tar - Support: sr #108516, Bug? Inconsistent behaviour of tar...


sr #108516: Bug? Inconsistent behaviour of tar x -g /dev/null -C dir vs. cd dir && tar x -g /dev/null

Submitted by:  None
Submitted on:  Sat 22 Feb 2014 12:57:34 PM UTC  
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Works For Me
Privacy:  Public Assigned to:  Sergey Poznyakoff <gray>
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 25 Feb 2014 10:38:44 PM UTC, comment #1: 

This was fixed in version 1.27

Sergey Poznyakoff <gray>
Project AdministratorIn charge of this item.
Sat 22 Feb 2014 12:57:34 PM UTC, original submission:  

Let's say (for the sake of simplicity) that I have a 2-level incremental backup. I restore level 0 and then level 1. There is a file which is present in backup level 0 but no longer exists in backup level 1.

If I do the following:

(1) tar x -g /dev/null < backup_level0.tar
(2) tar x -g /dev/null < backup_level1.tar

it works fine, i.e. the deleted file is not present in directory. (It is present after step 1 but gets removed in step 2.)

But if I do the following:

(1) rm -rf restore_dir
(2) mkdir restore_dir
(3) tar x -g /dev/null -C restore_dir < backup_level0.tar
(4) tar x -g /dev/null -C restore_dir < backup_level1.tar

the deleted file is present in restore_dir. It is being extracted in step 3 and then tar fails to delete it in step 4.

$ LANG=C tar --version
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by gray (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-25 gray StatusNone => Works For Me
        Assigned toNone => gray

    Back to the top

    Powered by Savane 3.5