HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.

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.