1832910 Members
2746 Online
110048 Solutions
New Discussion

Backup raw mode

 
SOLVED
Go to solution
Javier Ortiz Guajardo
Frequent Advisor

Backup raw mode

Please you help.

I want to make a backup of my database and it is working in raw mode.

Can you tell me which is the best way to do it with unix commands...i mean tar, cpio or dd,
thanks
The obstacles are those things that the people see when they left to see their goals.
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: Backup raw mode

If your database is on faw disk you will need to use a database utility to create a backup.

Using tar or cpio on a raw disk area won't get a good backup.

For oracle the tool is rman.
For software ag the tool is adabck

etc.

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
A. Clay Stephenson
Acclaimed Contributor

Re: Backup raw mode

If you are using raw devices then your only option is dd because the other commands must use a filesystem. Dd is not a very robust choice so you are far better off using the database backup tools (e.g. RMAN if Oracle).

If only 1 server is accessing the data (e.g not an Oracle parallel server, for example) then you could use OnlineJFS with cooked files but with mincache=direct,convosync=direct to bypass the buffer cache and do exactly whar raw i/o does.
If it ain't broke, I can fix that.
Javier Ortiz Guajardo
Frequent Advisor

Re: Backup raw mode

could you tell me the sintax to backup 2 or more raw areas with dd command and the target is a tape?

Thanks
The obstacles are those things that the people see when they left to see their goals.
Leif Halvarsson_2
Honored Contributor

Re: Backup raw mode

Hi,
Example of a dd backup to tape, substitute the raw devicfine and the tape devicefile with the files actual in your case. Don't forget to shutdown the database before.

dd if=/dev/vg01/rlvol1 of=/dev/rmt/0m

A better tool for rawdevice backup is OmniBack/DataProtector (do you have any backup application installed.

And as mentioned by other, a such backup should only be used for special needs. There is better ways to backup an Oracle database.
A. Clay Stephenson
Acclaimed Contributor

Re: Backup raw mode

Dd will have to backup only 1 raw partition at a time and you must use the norewind devices. I also suggest that you use a fairly large blocking factor to speed output.

dd if=/dev/vg01/rlvol1 of=/dev/rmt/1mnb bs=256k

followed by the next partition

dd if=/dev/vg01/rlvol2 of=/dev/rmt/1mnb bs=256k

The bad news is that you must make sure there is enough room on the tape because unlike cpio, dd will not prompt you for new media. You can make dd span tapes because you are able to specify starting offset in the input file.

I can only reemphasize that dd is a very poor choice for a backup because you really have no integrity tests. Under HP-UX 11.x (and especially 11.11), I think you will be hard pressed to demonstrate any performance benefits from using raw devices in a database.

If it ain't broke, I can fix that.