1832091 Members
2737 Online
110038 Solutions
New Discussion

Re: BACKUP RECOVERY

 
Bill Ogle
Occasional Contributor

BACKUP RECOVERY

What is the command that I put in on HP-UX on an HP 9000 10.20 machine to restore a file from a backup tape?
Never stop having fun!
7 REPLIES 7
Brian M. Fisher
Honored Contributor

Re: BACKUP RECOVERY

It depends on the format of the tape.
tar - tar xvf devicefile filename
fbackup - frecover
dump - restore
OmniBack - OmniBack

For more help:
man tar
man frecover
man restore

Brian
<*(((>< er
Perception IS Reality
Jennifer Chiarelli
Regular Advisor

Re: BACKUP RECOVERY

To add to Brian's response: If you're backup was created using SAM (ie: fbackup) then you can use SAM to recover a file. SAM will tell you if the backup is not fbackup. Another backup possibility is cpio.
All of this assumes that you are backing up standard HP-UX files. If you backed up a database then the database typically has its own backup routine (ie: not tar, cpio, fbackup etc.). In this case you must use the database tools for a backup or a restore.
It's a binary world!
David Rodman
Frequent Advisor

Re: BACKUP RECOVERY

Just to add one more...
Some backups use a compress. If when you get your file off of tape
a .Z or .gz extension indicates a compressed file
#man uncompress
Dan Am
Frequent Advisor

Re: BACKUP RECOVERY

and another:

useful for future use :

write the backup command used on the tape.
service oriented: add the presumed recovery
command.
do what you can. don't if you can't.
Carlos Fernandez Riera
Honored Contributor

Re: BACKUP RECOVERY


best way to do it:

mt -t /dev/rmt/0mn rew
dd if=/dev/rmt/0mn of=/tmp/P1 bs=10k count=1
dd if=/dev/rmt/0mn of=/tmp/P2 bs=10k count=1
.
.
.
.
dd if=/dev/rmt/0mn of=/tmp/Pn bs=10k count=1

file P1
file P2
...
file Pn

In other words :

read tape on raw mode,and just little blocks
file tells you what type of command had created that block.

Then rewind tape and apply the correct command to extract. Please, frist test using verbose and non extracting options:

tar tvf <-> tar xvf
cpio -itv <-> cpio -iv

Regards.











unsupported
Rick Garland
Honored Contributor

Re: BACKUP RECOVERY

Got many good replies - I strongly believe that at least one of the responses will help you. But one thing for sure, learn the backup/restore strategy! If using tar for the backups, learn how to extract the tar files from tape. If using fbackup, dump, cpio, pax, etc, learn how to use them, both putting on tape and extracting from tape.

This knowledge will prove invaluble at some point in time. Remember, it is not a question of "if I have to restore", it is a question of "when I have to restore". There is no "if"
James Odak
Valued Contributor

Re: BACKUP RECOVERY

If it was backed up with cpio
and the file is not a Database
try this
cd /
cpio -Budvicm "filepath/name" < /dev/rmt/drive

best way to get the format for the filepath is to do a
cpio -itv < /dev/rmt/drive
and break as soon as you see the format
depending on the backup
you may or may not start the path with a /
and starting at root ( / ) should put the file where it is supose to go