Re: tar cvfz test.tar.gz / gives error while untaring

From: CW Harris (charris_at_rtcmarketing.com)
Date: 02/29/04

  • Next message: Monique Y. Herman: "Re: Distributed Jukeboxes for LAN"
    Date: Sun, 29 Feb 2004 15:06:20 -0700
    To: Debian User <debian-user@lists.debian.org>
    
    

    On Sun, Feb 29, 2004 at 09:33:48PM +0100, Oliver Fuchs wrote:
    > On Sun, 29 Feb 2004, s. keeling wrote:
    >
    <snip>
    > > cd /
    > > tar cvzf /somewhere/test.tgz .
    > > cd /somewhere
    > > tar tvzf test.tgz
    > >
    > > Note the "." btw, tarring the whole root dir will tar the entire
    > > filesystem, including everything that's mounted off the root
    > > filesystem. man tar to find out how not to do that.
    >
    > Yes surely, I did a lot of --exclude=/mnt --exclude=/dev ... that was not the
    > problem.
    >
    > What I do not understand is:
    > I am in directory /home/me/TAR_EXAMPLE
    > Now I want to tar directory /tmp for example then I do
    >
    > tar cvzf temp.test.tar.gz /tmp
    >
    > Afterwards I receive in the directory /home/me/TAR_EXAMPLE the archive
    > temp.test.tar.gz which can be untared without any problems.
    >
    > But ... trying to do
    >
    > tar cvzf root.test.tar.gz / --exclude=home --exclude=/dev
    >
    > I receive the archive root.test.tar.gz in directory /home/me/TAR_EXAMPLE
    > but trying to untar it gives me the mkdir-error-message.
    >
    > Why is tar not processing the / directory like any other directory and why is
    > it adding a / when tar xvzf cannot untar it?
    >
    > So the conclusion would be that trying to tar the / directory I have to cd
    > into that directory to make it working while with any other directory I can
    > start the tar-process from where ever I want?
    >
    I don't think it should do that without the "-P" switch. What version
    are you running? My quick check (as root or not was the same):

            Script started on Sun Feb 29 14:59:32 2004
            chris:~> tar cvzf root.tgz /
            tar: Removing leading `/' from member names
            tar:
            lost+found/
            root/
            .
            .
            .

    I'm using:
            tar (GNU tar) 1.13.25
            Copyright (C) 2001 Free Software Foundation, Inc.

    -- 
    Chris Harris <charris@rtcmarketing.com>
    Linux --- The best things in life are free!
    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Monique Y. Herman: "Re: Distributed Jukeboxes for LAN"

    Relevant Pages

    • Re: XFS: 2.6.26-rc6 link count mismatch for inode
      ... output in dmesg when mounting the filesystem)? ... scsi0: ahci ... Ending clean XFS mount for filesystem: ... The tar xf mozilla-source.tarball was not responding ...
      (Linux-Kernel)
    • Re: Quickest way to bulk copy many files from one disk cluster to another
      ... Copy the whole filesystem with tar while in production, ... Star also implements a -copy flag that allows to avoid pipe related performance ... When one filesystem is NFS mounted, try to make the _source_ filesystem ...
      (comp.unix.solaris)
    • ISO vs .tar
      ... I am experimenting with a new backup strategy based on a DVD-RAM device, ... I opt not to make a zipped archive, because unzipping it off the DVD-RAM ... straight .tar. ... Which type of "filesystem", the .iso ...
      (comp.os.linux.misc)
    • Re: using star to move 3 millions files .. going slowly .. painfully
      ... On a fragmented filesystem, ... not to use logging but to set the "fastfs" flag. ... Sun's tar is much slower than star. ...
      (comp.unix.solaris)
    • Re: dumping a samba directory
      ... prog like tar do you have any recommendations on which type of archiver ... you can give dump the ... but it actually bypasses the normal filesystem ... Samsung printers and HOSTING packages ...
      (freebsd-questions)