Solved

Tape backup using tar

Posted on 2004-10-14
3
1,166 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
  • 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

776 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