[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tar help



on Wed, Dec 06, 2000 at 07:06:38AM +0100, Thomas Wegner (thomas_wegner@gmx.net) wrote:
> Hallo!
> 
> Could anyone help me? I tried to restore specific files from the second
> archive on my DAT-Tape (i think they are in the second archive but I'm not
> sure) into an specific path. The following procedure doesn't work:
> 1) moving into the directory where the files should be restored
> 2) forward the band to the second archive (mt -f /dev/nst0 fsf)
> 3) tar -xvf /dev/nst0 path/of/the/files/*
                        ^^^^^^^^^^^^^^^^^^^

This is your problem.

You're also not going to get a restore quite as you want it, I suspect.

First issue:  you need to supply a list of files to your restore
command, something like:

   tar xvf /dev/nst0 mypath/myfile1 mypath/myfile2 mypath/myfile3

You're essentially asking for files which don't exist -- there isn't a
file "path/of/the/files/*" -- with a literal '*' (tar doesn't do
wildcard expansion on its own archive).


Second:  tar is going to recreate the entire directory tree of these
files.  My SOP is to create a 'restore' directory someplace convenient,
untar into that, and then move the individual files where needed.

Regarding the file list, it might be helpful to output the list of files
first, then restore them:

    mkdir restore; cd restore
    mt rewind; mt fsf 1
    tar tvf /dev/nst0 > filelist
    # manually edit the file list
    mt rewind; mt fsf 1
    tar xvf /dev/nst0 $( cat filelist )
    mt rwoffl

-- 
Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Zelerate, Inc.                      http://www.zelerate.org
  What part of "Gestalt" don't you understand?      There is no K5 cabal
   http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org

Attachment: pgpRJMGhRW4Xo.pgp
Description: PGP signature


Reply to: