Operating System - HP-UX
1833451 Members
3004 Online
110052 Solutions
New Discussion

How to read a recovery tape

 
Faizer
Advisor

How to read a recovery tape

Hi Gurus
I have done a recovery tape using the following command.
make_tape_recovery -I -i

I need to reade the contents of this tape. Also I need to know how to restore the /var directory from this tape.
Your cooepration is highly appreciated.
best regards
8 REPLIES 8
Sundar_7
Honored Contributor

Re: How to read a recovery tape

Hi,

# mt -f /dev/rmt/0mn rew
# mt -f /dev/rmt/0mn fsf 1
# tar -xvf /dev/rmt/0mn /var

Sundar
Learn What to do ,How to do and more importantly When to do ?
Jeff Schussele
Honored Contributor

Re: How to read a recovery tape

Hi,

First rewind the tape

mt rew

Then skip forward one file space

mt fsf 1

Then make sure you're in the root

cd /

Then extract var

tar xv var/*.*

Note NO leading slash. And IF your tape drive is not /dev/rmt/0mn then you'd need to specify it as that's the default.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bruno Ganino
Honored Contributor

Re: How to read a recovery tape

Right Sundar.
Well, compliments for speedy !
Bruno
Torino (Turin) +2H
Faizer
Advisor

Re: How to read a recovery tape

I get the checksum error.
ioscan shows that the device is /dev/rmt/0mb

I use this for the device
I use the tar tvf command instead of the x command as I want to read the contents of var.
I use the mt commands as advised.
update pelase
Jeroen Peereboom
Honored Contributor

Re: How to read a recovery tape

L.S.You must use the no-rewind device (/dev/0mn) so with the n of no-rewind. Either you have not done that or you have a real problem with your tape.I do not know if you have to specify '/var or 'var'. Jeff sounds sure though. But in Jeff's answer do not specify var/*.* without quotes around it because the shell will expand the argument (wildcards) before starting the tar command. This means that you only restore the files which are already present on your system (Actually I had this problem a few years ago and it took me an afternoon to find the cause Finally, I think you should just specify 'var'. But why not check it first using 'tar tvf /dev/rmt/0mn' to list the contents of the tape?Success JP
Jeroen Peereboom
Honored Contributor

Re: How to read a recovery tape

By the way: the tape contains two 'archives' or 'files'. The first one is bootable. The second one is a tar archive. That's why you have to 'mt fsf 1 /dev/rmt/0mn' to position the tape at the beginning of the tar archive.JP.
Sanjay_6
Honored Contributor

Re: How to read a recovery tape

Hi,

If you just want to read and not extract use tar tvf in place of tar xvf.

a) Skip over the first image with mt command using the appropriate tape device file;

# mt -f /dev/rmt/0mn rew
# mt -f /dev/rmt/0mn fsf 1

b) Verify the contents of the tar image with the tar command using the appropriate device file;

# tar tvf /dev/rmt/0m

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: How to read a recovery tape

Hi,

If you backed up using 0mb, use tar tvf /dev/rmt/0mnb to read the contents.

In the previous post use /dev/rmt/0mnb in place of /dev/rmt/0mn.

Hope this helps.

Regds