Operating System - HP-UX
1754932 Members
1811 Online
108827 Solutions
New Discussion юеВ

Re: extract single file (or directory) from make_tape_recovery

 
SOLVED
Go to solution
Ratzie
Super Advisor

extract single file (or directory) from make_tape_recovery

I accidently deleted a whole directory under home.
Can I extract the files from the tape, without having to boot to tape? I can not bring the system down...

I thought it was
mt fsf 1
tar -xvf /dev/rmt/0mn filename

It looks like it runs, and finishes but it does not replace the file!

HP 11.00
5 REPLIES 5
Jeff Schussele
Honored Contributor
Solution

Re: extract single file (or directory) from make_tape_recovery

Hi,

You need to give the full path exactly as stored on the tape so after the mt fsf 1 do a tar tv and note the path.
Then the command would be like
tar xv /path/to/filename

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

Re: extract single file (or directory) from make_tape_recovery

rewind the tape first, then fast forward (fsf), then tar -xvf with no leading slash to the filename.

For instance:
# tar xvf /dev/rmt/0mn etc/copyright

The exact steps are on the make_tape_rwecovery (make_recovery) man page.
"Downtime is a Crime."
Jeff Schussele
Honored Contributor

Re: extract single file (or directory) from make_tape_recovery

Thanks for the assist Cheryl.
I *thought* there was no leading slash but have been unable to find a server that had a tape loaded.

So to restore a user's home would be like:
mt rew
mt fsf 1
tar xv home/user_name

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Cheryl Griffin
Honored Contributor

Re: extract single file (or directory) from make_tape_recovery

Make sure you do a cd / first. You want to be in root and then your syntax is correct.
"Downtime is a Crime."
Mic V.
Esteemed Contributor

Re: extract single file (or directory) from make_tape_recovery

This isn't helpful for this time (probably), but possibly for the future. There's nothing *wrong* with counting on Ignite for a backup of /home, and this was an interesting thread, but I normally rely on my backup software (such as Legato Networker, Veritas Netbackup, Data Protector, or fbackup) for a restore of /home.

Since these types of restores (from filesystem backups) get done on a regular basis, there's no angst. I even keep a spare tape with some of this important stuff so I don't have to wait for an offsite tape to come back. But I know that sometimes you just work with what you have! :)

Mic
What kind of a name is 'Wolverine'?