Operating System - HP-UX
1753868 Members
7400 Online
108809 Solutions
New Discussion юеВ

Re: Restoring files from Ignite Backup using Tar

 
SOLVED
Go to solution
sysad_boy
Frequent Advisor

Restoring files from Ignite Backup using Tar

Hi Guys,

I recently made a backup of my vg00 using Ignite. My vg00 has filesystems in it which contains some data which I need to restore right now.

Sample of my Ignite backup command:
make_tape_recovery -Ava /dev/rmt/15mn -I

From that command, can I restore some data files using Tar?


TIA!
7 REPLIES 7
Patrick Wallek
Honored Contributor
Solution

Re: Restoring files from Ignite Backup using Tar

Yes, you can.

Say you want to restore /etc/hosts from the make_tape_recovery....

1) insert tape in drive
2) rewind the tape -- mt -f /dev/rmt/15mn rew
3) fast forward over the boot header -- mt -f /dev/rmt/15mn fsf 1
4) extract the file(s) required -- tar -xvf /dev/rmt/15mn etc/hosts

NOTE: The files are stored on tape relative to the '/' directory, so they do NOT have a leading '/'.

If you want to get a list of files on tape you can do 'tar -tvf /dev/rmt/15mn' in step 4 above.
sysad_boy
Frequent Advisor

Re: Restoring files from Ignite Backup using Tar

What if I used absolute pathname? Liek for example:

tar -xvf /dev/rmt/15m /home/ctmagent/Agent/ctm/data/CONFIG.dat

Whats the difference without putting the "/" ?
James R. Ferguson
Acclaimed Contributor

Re: Restoring files from Ignite Backup using Tar

Hi:

> Whats the difference without putting the "/" ?

As Patrick said, Ignite uses relative paths not absolute ones when archiving to tape. Hence, if you specify a restoration with a leading '/' to your filename(s) then 'tar' will not find a matching entry.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: Restoring files from Ignite Backup using Tar

It won't restore if you use the absolute path. You have to use the path name as it is in the tar file.

Just omit the leading '/'.

# cd /
# tar -xvf /dev/rmt/15m home/ctmagent/Agent/ctm/data/CONFIG.dat
Michael Steele_2
Honored Contributor

Re: Restoring files from Ignite Backup using Tar

use the tar -cvf command to look at the tape table of contents. Follow the mt -t /dev/rmt/0m (* no rewind *) fsf (* move forward *)

mt -t /dev/rmt/0m rew (* rewind to start *)
mt -t /dev/rmt/0m rew (* run at least twice since there are two EOF markers on an ignite tape *)
mt -t /dev/rmt/0m fsf (* get past first record of boot lif *)
tar -tvf /dev/rmt/0m (* read table of contents *)
tar -tvf /dev/rmt/0m | more (* easier to read *)

To extract
1-3 above are the same
tar -xvf /dev/rmt/0m /dir/dir/filename
Support Fatherhood - Stop Family Law
Patrick Wallek
Honored Contributor

Re: Restoring files from Ignite Backup using Tar

>>use the tar -cvf command to look at the tape table of contents.

That would be 'tar -tvf'. 'tar -cvf' will STORE files.
Dennis Handly
Acclaimed Contributor

Re: Restoring files from Ignite Backup using Tar

You may want to use pax(1) to restore the files after you use mt(1) to move forward.
pax -r -v -f dev/rmt/15mn etc/hosts

pax(1) also lets you rename filename paths with -s.