Operating System - HP-UX
1834136 Members
2376 Online
110064 Solutions
New Discussion

restore a file/directory from make_tape_recovery

 
SOLVED
Go to solution
Joseph Bague
Frequent Advisor

restore a file/directory from make_tape_recovery

Hi all,

How to restore a file/directory from a make_tape_recovery? Do I need to use the tar or pax command.
Can you give some sample.

Many tnxs in advance :)
Joseph
Expect nothing but ready for everything
8 REPLIES 8
Jean-Louis Phelix
Honored Contributor

Re: restore a file/directory from make_tape_recovery

hi,

You can do it using tar :

- rewind tape if needed :

mt -f /dev/rmt/0mn rew

- skip boot on tape by :

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

- restore file using tar :

tar xvf /dev/rmt/0m pattern

Regards.
It works for me (© Bill McNAMARA ...)
Kiran Kumar Aekabote
Frequent Advisor

Re: restore a file/directory from make_tape_recovery

Hi Joseph

Put the make recovery tape in drive and run the following commands seq. U need to restore from the tar command

mt -t rew
ex. mt -t /dev/rmt/0mn rew

mt -t ex. mt -t /dev/rmt/0mn fsf 1

Go to /tmp or any other directory and extract using tar

tar xvf


You Just can't beat ME
Joseph Bague
Frequent Advisor

Re: restore a file/directory from make_tape_recovery

Hi Jean,

I already done step 1 and 2
on step 3 I try this command

#tar xvf /dev/rmt/0m /home/user1/*

nothing happen, is this correct? I am trying to extract the entire directory/content of user1

Regards
Joseph
Expect nothing but ready for everything
twang
Honored Contributor

Re: restore a file/directory from make_tape_recovery

To extract (with tar) a file from an Ignite's make_recovery tape by doing the following:
# mt -t /dev/rmt/0mn rew
# mt -t /dev/rmt/0mn fsf 1
# cd /tmp
# tar xvf /dev/rmt/0mn
twang
Honored Contributor

Re: restore a file/directory from make_tape_recovery

To extract (with tar) a file from an Ignite's make_recovery tape by doing the following:
# mt -t /dev/rmt/0mn rew
# mt -t /dev/rmt/0mn fsf 1
# cd /tmp
# tar xvf /dev/rmt/0mn
twang
Honored Contributor

Re: restore a file/directory from make_tape_recovery

To extract (with tar) a file from an Ignite's make_recovery tape by doing the following:
# mt -t /dev/rmt/0mn rew
# mt -t /dev/rmt/0mn fsf 1
# cd /tmp
# tar xvf /dev/rmt/0mn
Jean-Louis Phelix
Honored Contributor
Solution

Re: restore a file/directory from make_tape_recovery

hi,

Your problem is related to the pattern. With tar, you have to match the string exactly as it was backed up. To be really sure, use step 1 and to, then use tar tvf /dev/rmt/0m to check, but I think that path is relative to / (I mean etc/group for example, but it could also perhaphs be ./etc/group)

So in your case it should rather be something like :

#tar xvf /dev/rmt/0m home/user1

to restore full directory.

Regards.
It works for me (© Bill McNAMARA ...)
Michael Steele_2
Honored Contributor

Re: restore a file/directory from make_tape_recovery

Remove the / forward slash on the 'pattern'.

#tar xvf /dev/rmt/0m home/user1/*

You can verify and absolute or relative backup, (* use of the root / *), by first listing the table of contents with 'tvf' :

#tar tvf /dev/rmt/0mn

-even redirect the output into a file-

#tar tvf /dev/rmt/0mn > /tmp/tar_file

vi /tmp/tar_file

Also, use the /dev/rmt/0mn 'no rewind' device instead of 'rewind' /dev/rmt/0m' after :

mt -t /dev/rmt/0mn rew

If you don't use 'no rewind' when you position the tape with 'mt' then you'll always start at the beginning of the tape, which is the binary bootlif record. The 'tar' ascii record is the second tape record, that's why you move the tape forward with 'mt'.
Support Fatherhood - Stop Family Law