[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Tape backup using tar

Posted on 2004-10-14
3
Medium Priority
?
1,175 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 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

656 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