Operating System - HP-UX
1753776 Members
7168 Online
108799 Solutions
New Discussion юеВ

restore /usr with an ignite-ux tape

 
matlefou84
New Member

restore /usr with an ignite-ux tape

Hi all!

I have a big problem. I delete all the /usr of my system with the command "rm *" and i would like to restore it with a ignite-ux tape (because i have deleted only this FS).
How i do this??
I've boot from the tape and try to use the "HP-UX installation process" and select the "Run a Recovery Shell" but i am stop at this step.
Can you help me please, it's emergency!

Thanks.
9 REPLIES 9
Tom Danzig
Honored Contributor

Re: restore /usr with an ignite-ux tape

I would suggest recovering the entire recovery tape assumings it is not too old.

I do not think you can only recover /usr though. You would need to do a "mt -t /dev/rmt/0mn fsf 1", however, the mt command resides under /usr/bin (there is a staticly linked tar in /sbin though (which would be needed also). I think you will have to go through with the entire recovery process. Once that is done you can restore newer files if necessary from your normal full backups.
Tom Danzig
Honored Contributor

Re: restore /usr with an ignite-ux tape

I am assuming that the system will not boot normally due to the /usr file system issue.

Just a thought: If the recovery shell has the mt command availabel, try:

# cd /
# mount /usr
# mt -t /dev/rmt/0mn fsf 1
# tar xvf /dev/rmt/0mn usr

Good luck.
RAC_1
Honored Contributor

Re: restore /usr with an ignite-ux tape

I think you will have to do full recover. Even if you get into single user mode/recovery shell, the mt command won't be availble to restore usr. with everything intact, it is possible to do selective restore from ignite tape.

Anil
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: restore /usr with an ignite-ux tape

Ignite is desgned for full recovery of /dev/vg00 if thats what was recovered.

Its best to boot off the tape and do the restore. You can try and extract /usr off the tape but certain things like links may not restore properly.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sanjay_6
Honored Contributor

Re: restore /usr with an ignite-ux tape

Hi,

If the system has not been rebooted, you can try to recover using the ignite tape using these commands.

cd /
mt fsf 1
/sbin/tar xvf /dev/rmt/0mn usr
mt rew

The device used with the tar command is the no-reqind device.

Hope this helps.

Regds

Sanjay_6
Honored Contributor

Re: restore /usr with an ignite-ux tape

Hi,

Take a look at this thread,

http://www1.itrc.hp.com/service/cki/search.do?category=c0&mode=id&searchString=ozbekbrc00000581&searchCrit=allwords&docType=Security&docType=Patch&docType=EngineerNotes&docType=BugReports&docType=Hardware&docType=ReferenceMaterials&docType=ThirdParty

The itrc doc id is OZBEKBRC00000581

You have to boot through the ignite tape, activate root vg, chroot, mount usr and then do the restore.

Hope this helps.

Regds
Scot Bean
Honored Contributor

Re: restore /usr with an ignite-ux tape

Here's an idea:

- if you have another, similar machine you do not care about, restore it with your tape, then copy /usr from this machine to yours.
Tor-Arne Nostdal
Trusted Contributor

Re: restore /usr with an ignite-ux tape

Are you sure the entire /usr is gone...
Normally "rm *" isn't enough..
You must have used "rm -r *"
If /usr/sbin /usr/lbin is available it
might be that you're able to use ftp or r-commands from another machine into this one... (if you have another machine available ;-).

This would help you dramatically.
Otherwise...

As mentioned you can read the ignite tape as a tar backup:
- if you skip the boot-record(lif)
- by using the mt fsf command
- and using a no-rewind device

If you want to restore to a directory other than the original location you must use the pax command instead of tar.
With pax you can substitute the /usr with f.ex. /new_usr

.... but to have access to these commands whicha are located in /usr/... you're likely to first of all boot the machine from the ignite tape as Sanjay already stated.

/Tor-Arne
I'm trying to become President of the state I'm in...
matlefou84
New Member

Re: restore /usr with an ignite-ux tape

ok, i will try this but i can't make the command "mount /usr" because i haven't the command mount in the recovery shell!
I have tryed to load the command via loadfile (loadfile mount) but the command is already not found.

I think that i can load it with a tape countaining the exec command mount, so i did it but it doesn't work. I have used the tar and pax commands to do this.

Do you have idea ??