Link to home
Start Free TrialLog in
Avatar of NBilly
NBilly

asked on

Tape backup using tar

I perform the following command to backup a file to tape.  But, we I want to list the content of the tape I get no output and error.

mt -f /dev/nst0 rewind
tar cvf /dev/nst0 sqlnet.sql

and when I want to list the content of tape with

Tar tf /dev/nst0 ( there is no output)

What am I doing wrong.

When I do
mt -f /dev/nst0 status ( the output is )
SCSI 2 Tape Drive:
Filenumber=-1,  blocknumber=-1, partition=-1.
Tape block size 0 bytes.  Density code 0x40 (DLTI 40gb, or Ultrium)
 
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NBilly
NBilly

ASKER

I did a mt - f /dev/nst0 rewind where you suggested.  Then I did a tar -tf /dev/nst0 and it outputs sqlnet.log.  Just to test another file, I did a mt -f /dev/nst0 fsf 1 and did tar cvf /dev/nst0 nbtest.log.

After that I did a mt -f /dev/nst0 rewind and then did a tar -tf /dev/nst0 but it only lists the sqlnet.log from the first tar command.  Do you know why it's not outputting the nbtest.log.
Avatar of NBilly

ASKER

I figured out my second in my last comment.  I understand how it works now. Thanks.