Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

How to backup oracle raw devices using dd on HP-UX

SOLVED
Go to solution

How to backup oracle raw devices using dd on HP-UX

Hi,
I have following problem, I need to backup oracle raw devices using dd.
Like dd if=/dev/vgxxx/rlxxx of=/fs/file.
I don`t know how many blocks on HP-UX raw device must I skip to succesfull backup.
Thanks for advice.
Regards.
5 REPLIES
Stefan Farrelly
Honored Contributor
Solution

Re: How to backup oracle raw devices using dd on HP-UX

you need to dd the entire raw lvol to be sure you have a good backup as well as ensuring the database is down and nobody is accessing the raw lvol. eg;

dd if=/dev/vgXX/rlvolYY of=/dev/rmt/0m

So if you need to recover you just do the reverse.
Im from Palmerston North, New Zealand, but somehow ended up in London...
A. Clay Stephenson
Acclaimed Contributor

Re: How to backup oracle raw devices using dd on HP-UX

No offset values are needed; you don't even need to worry about the number of blocks to transfer as long as the destination device is at least as large as the source.
If you are backing up to tape (or anything else for that matter) I would use a fairly large block size (e.g. bs=1024k).






If it ain't broke, I can fix that.
Michael Steele_2
Honored Contributor

Re: How to backup oracle raw devices using dd on HP-UX

Raw bypasses the file system layer so although the Oracle block size, DB_BLOCK_SIZE=8192 bytes, you can ignore this.

512 bytes is the default raw block size and if 'dd' is the only process on /dev/vg##/rlvol# when you're backing up (* and it should be *) then go really big like bs=5120k.

dd if=/dev/vg##/rvol# of=... bs=5120k

Use factors of 512 for other block sizes.
Support Fatherhood - Stop Family Law

Re: How to backup oracle raw devices using dd on HP-UX

Thanks for advice.
Best regards
Frantisek
twang
Honored Contributor

Re: How to backup oracle raw devices using dd on HP-UX

In our case, we shutdown the database every night and take a backup for the disk(oracle raw data exists) by using a cron script including the following command:
dd if=/dev/dsk/c1t15d0 of=/dev/c5t1d0 bs=8192
or simply dd to tape.