1834462 Members
3107 Online
110067 Solutions
New Discussion

TAR INDEX

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

TAR INDEX

I need to dump a tar tape index. Can I do that?
I backed up a huge amount of data to a DLT via tar and now I need to get a file off of it. What is the best way to do this without restoring the entire tape?
UNIX IS GOOD
2 REPLIES 2
Steve Steel
Honored Contributor
Solution

Re: TAR INDEX

Hi


tar -tvf /dev/rmt/0m > /tmp/tarindex

check on filename on index

tar -xvf /dev/rmt/0m file


If you do not give the name as stored on tape
then it is not found.

Word to the wise. Use fbackup this will be slow


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Simon Hargrave
Honored Contributor

Re: TAR INDEX

Bear in mind that "dumping a tar tape index" will still read the whole tape. tar doesn't store an index at the beginning, so it has to read the whole tape to get a full list.

If you want to restore a single file, and you know it's full path, then you can specify the file to restore to tar: -

tar xvf /dev/rmt/0mn file/to/restore

How long this takes to restore will depend on how far through the tape it is. tar will have to read through all the tape, up to the point where the file is. If you're lucky, it'll be at the start. If you're unlucky, it'll be at the end!