Solved

Tape backup using tar

Posted on 2004-10-14
3
1,170 Views
Last Modified: 2013-12-16
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)
 
0
Comment
Question by:NBilly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
ID: 12313381
After doing 'tar cvf /dev/nst0 sqlnet.sql' and before executing 'tar tf /dev/nst0' are you doing an 'mt -f /dev/nst0 rewind'? You are using a no-rewind on close tape device so after writing the archive the tape will be left at the end of the archive. So attempting to list the archive without rewinding will result in no output.
0
 

Author Comment

by:NBilly
ID: 12321527
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.
0
 

Author Comment

by:NBilly
ID: 12323599
I figured out my second in my last comment.  I understand how it works now. Thanks.
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question