Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I can take a backup with an IBM LTO tape drive in RedHat 5 using mt and tar, but I can't restore it. I can't see previous backup content. Whenever I try to take a backup, I think that the new backup overwrites the one on tape every time.

mt command does not work to rewind the tape.

Can someone explain how I should restore and list backup contents from the tape drive?

share|improve this question
add comment

1 Answer 1

If you want to store more than one archive file on a tape, you can do so by using the nonrewinding tape device filename.

For example:

tar cvlpf /dev/nst0 /home
tar cvlpf /dev/nst0 /

That should write the /home and the / into 2 separate files in the tape device.

To access each files after you have created them in the tape, you should use mt as mt take the following syntax:

mt -f device operation [count] [arguments]

You should put fsf and a number in the [count] in order to go to that number file. bsf and number is backwards.

So suppose you have written already one file to the tape drive with the above tar command, now you should do #mt -f /dev/tapeDev fsf 1 then issue the second tar command (for example you could use the mentioned above command), then #mt -f /dev/tapeDev offline in order to rewind and unload the tape.

Always it is good idea to issue the #mt -f /dev/tapeDev rewind command before you write anything to it, so that you make sure that you start to write to the start of the tape drive.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.