Operating System - HP-UX
1824176 Members
3259 Online
109669 Solutions
New Discussion юеВ

how restore replacing actual files

 
Cristian_4
Regular Advisor

how restore replacing actual files

hi,

i had a big crash in the boot disk, so i had to rebuild it again from scratch

luckly, i got backups of every lvol, but i didn't have an exact ignite image of the crashed disk, so when i reinstalled it, there were a lot of stuff that i dont need

i got 2 questiosn

i can't really remember the restore command, i got the backups files in another disk, so i can mount it to restore them. i remember that it was something like "restore x -f " but im not really sure, can anyone help me ?

and the second question is if can i replace the content of every lvol with the restore of the backup file ?, so the stuff that i dont need is deleted and i only keep the content of the backup file.

thanks


7 REPLIES 7
Tony Constantine
Frequent Advisor

Re: how restore replacing actual files

When you say that you've had to rebuild from scratch I guess you mean that you've re-installed the hpux os so you have a nice clean install which should suggest that you shoudn't go around deleting any files on the os lvols /usr /sbin / etc.

What you should do now is install the patch bundles that you had installed previous or this may be an opportunity to install the latest ones then reinstall any apps that you had ie mirrordisk glanceplus oracle

Then try to restore your "data" areas
Cristian_4
Regular Advisor

Re: how restore replacing actual files

yes, re-install hpux from scratch.

but if i leave it with the default installation , i will lose the special configs for the machine and particular programs installed in it

the data it's in another disk (external), so no harm done
Deoncia Grayson_1
Honored Contributor

Re: how restore replacing actual files

Did you have to reinstall only the root disk and your data is sitting on external disks or disk array and you want to bring everything back?

If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Cristian_4
Regular Advisor

Re: how restore replacing actual files

i re-installed the root disk
the data is in an external disk untouched

i want to bring back everything, the way that it was

Kevin Liquori_1
Regular Advisor

Re: how restore replacing actual files

I'm not sure what restore command you're thinking of, is it vgcfgrestore? That would replace LVM information on the disk, not data. You don't want to do that.

It sounds like the drives were mirrored so you can mount the alternate drive which contains your information. Unfortunately, there's no easy way to recover the data. You may want to copy files from under /usr/local/ if that's where you've placed customized scripts and binaries. Configuration files under /etc would be another place to look, but I would not do a blanket copy of either directory.

Kevin
Deoncia Grayson_1
Honored Contributor

Re: how restore replacing actual files

you can always copy the data back to the appropriate files if its the root data you want to restore, i.e. /etc/passwd, /etc/hosts/, and so on... I'm not really clear what exactly you want to restore.

De
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Stuart Whitby
Trusted Contributor

Re: how restore replacing actual files

I'm confused as to exactly what you've got on backup and what and how you've recovered so far.

You say that you have backups of every lvol but not an exact image of the crashed disk. If you have backups of every volume, then recovering these should give you an exact image of the disk at the time of backup. So how do you get "a lot of stuff you don't need" recovered? Is this a recover from a different system?

Also, if you have the backups on another system, then I'd recommend rebuilding your disk with a minimal install and volume groups the same size as before the crash, deleting virtually everything in them, then recovering from backup to those empty lvols. The only stuff you should need to do this is a minimal install on /, move the sbin directory onto that filesystem, get the backup software onto /, then blow away the contents of the other lvols. You still have all you need to do the recover, and you end up as close as possible to your original config.

A sysadmin should never cross his fingers in the hope commands will work. Makes for a lot of mistakes while typing.