Bug 132281 - Tar with -l and --listed-incremental=<file> appears broken
Tar with -l and --listed-incremental=<file> appears broken
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: tar (Show other bugs)
2
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Peter Vrabec
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-10 11:45 EDT by Terry Barnaby
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-07 05:19:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Terry Barnaby 2004-09-10 11:45:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Gecko/20040803

Description of problem:
Hi,

There has been a major bug (at least to me :) ) in tar since version
1.13.7 and it is still there in GNU tar 1.14.90 as well as Fedora 2's
1.13.25-14.

There is a bug report 34380 for redhat-linux 7.0 on this but these
bugs do not seem to have been carried forward to Fedora .....

I normally perform full backups with a command similar to:

tar -c -l -f /dev/st0 --listed-incremental=stamp / /usr /dist /src /home

If I do this tar does not backup all of my systems files contained in
the separate mount points.
I have a simple example that illustrates the problem.
In this case there are two directories a and b each containing a file.
The second directory has a separate file system mounted on it (created
with
a Linux loop back device). When I run this with the newer versions of
tar the files in the directory b are not backed up ....

################################################################################
#    Tar bug
################################################################################
#

setup(){
    # Create dirs
    mkdir a
    mkdir b
    
    # Create a file system
    dd if=/dev/zero of=fs count=1000; mke2fs -F fs
    
    # Mount file system
    mount -o loop fs b
    
    # Create files
    echo "Hello There" > a/filea
    echo "Hello There" > b/fileb
}

cleanup(){
    umount b
    rm -fr a b fs s
}

runTest(){
    echo "Perform Tar"
    rm -f s;
    tar -clf - -g s . ./b | tar -tf -
    echo "Perform Tar: completed"
}

setup
runTest
cleanup
--------------------------------------------------------------------------------

Terry 

Version-Release number of selected component (if applicable):
tar-1.13.25-14

How reproducible:
Always

Steps to Reproduce:
1. Listed above
2.
3.
    

Additional info:
Comment 1 Peter Vrabec 2004-10-07 05:19:21 EDT
http://www.gnu.org/software/tar/manual/html_mono/tar.html#SEC106

The `--one-file-system' option causes tar to modify its normal
behavior in archiving the contents of directories. If a file in a
directory is not on the same filesystem as the directory itself, then
tar will not archive that file. If the file is a directory itself, tar
will not archive anything beneath it; in other words, 
TAR WILL NOT CROSS MOUNT POINTS.

Note You need to log in before you can comment on or make changes to this bug.