Operating System - HP-UX
1838315 Members
3397 Online
110125 Solutions
New Discussion

Re: Recovering a file which is backedup using dd command

 
A.Vishwanath_2
Advisor

Recovering a file which is backedup using dd command

Dear Gurus,

I have taken backup of 10 RAW LOGICAL VOLUMES using the below command
#dd if=/dev/vgsg/rt1.dbf of=/dev/rmt/0mn bs=8k
#dd if=/dev/vgsg/rt2.dbf of=/dev/rmt/0mn bs=8k
#dd if=/dev/vgsg/rt3.dbf of=/dev/rmt/0mn bs=8k

Now i want to restore the rt3.dbf file.Can u pls let me know the procedure for recovering the same.

TIA
Vishwanath.A
5 REPLIES 5
Mark Grant
Honored Contributor

Re: Recovering a file which is backedup using dd command

Just reverse the "if" and "of" devices as in

dd if=/dev/rmt/0mn of=/dev/vgsg/rt1 bs=8k
Never preceed any demonstration with anything more predictive than "watch this"
Bernhard Mueller
Honored Contributor

Re: Recovering a file which is backedup using dd command

Hi,

assuming you dd'ed all three files on a single tape (you used no-rewind device file) and want to restore ONLY the third tapefile, you would have to make sure to rewind the tape to the beginning, move forward two tapefiles, then extract the third tapefile.

mt -f /dev/rmt/0m rewind
mt -f /dev/rmt/0mn fsf 2
dd if=/dev/rmt/0mn of=/dev/vgsg/rt3.dbf bs=8k
mt -f /dev/rmt/0m rewind

Regards,
Bernhard
T G Manikandan
Honored Contributor

Re: Recovering a file which is backedup using dd command

% dd if=/dev/rmt/0m of=/dev/ bs=
Mark Grant
Honored Contributor

Re: Recovering a file which is backedup using dd command

oops, didn't read your post correctly. Bernhard has the correct answer to your question.
Never preceed any demonstration with anything more predictive than "watch this"
T G Manikandan
Honored Contributor

Re: Recovering a file which is backedup using dd command

It this is a Oracle restore,you can also use the dbv (dbverify) utility to verify the restoration.

revert on further help!