Operating System - HP-UX
1752779 Members
6063 Online
108789 Solutions
New Discussion юеВ

Re: Backup and restoring raw devices

 
SOLVED
Go to solution
amrelsayed
Frequent Advisor

Backup and restoring raw devices

Dear all,

i had installed oracle 10g rac on service guard extension for rac. and i had used LVM, so i created raw devices for the database. my question is: does anybody have a perfect solution for backup and restoring these raw devices, also i need to know if i using os commands how can i do these operations.

Best regards,
Amr
Try To Be Smart
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: Backup and restoring raw devices

Shalom,

There is no such thing as a perfect solution.

Since you have to use raw devices you have limited your options as well.

1) rman hot/cold backup
2) Tool such as DP 5 or Veritas to enable hot or cold backups. Both actually use rman btw.

What you can not do: direct backup of raw devices with fbackup and OS tools. This approach will simply not produce a usable backup.

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
Bill Hassell
Honored Contributor

Re: Backup and restoring raw devices

Using raw devices for Oracle can improve performance but it present a critical requirement in backup. NONE of the built-in tools will work (tar, cpio, fbackup, etc) and while dd can read a raw device, it has no reliability or identification features. Because there are no files on the device, it is impossible to tell what is on the tape, when it was backed up, or whether the raw device spans more than one tape.

You must purchase a commercial backup product such as HP's Data Protector which can accurately and reliably backup raw devices as well as identify tapes and keep accurate records for all the backups.

Additionally, there is no way to prevent the raw devices from being accidentally overwritten by newfs or other tools. It is very important to NOT name these volumes lvol1 lvol2 lvol, etc as a flag to warn sysadmins that these are special.


Bill Hassell, sysadmin
Hein van den Heuvel
Honored Contributor
Solution

Re: Backup and restoring raw devices


Surely whoever decided on using raw devices included a backup/restore plan with that decision, so just ask that person!

As Steven replies, you really should use a database native tool like Rman.

Personally, for the purpose of backing up and restore benchmark data, I have been happy with dd + zip. But this was NOT production data, so I could play fast and loose, all was recoverable. So I woudl use something like: # dd -bs=1024k -if=/dev/vol/rlvx | bzip2 -c > rlvx.dd.zip


hth.
Hein.
Bill Brunnler
Occasional Advisor

Re: Backup and restoring raw devices

We currently backup our RAC datebases with RMAN and Comvault. Seems to work fine
Frank de Vries
Respected Contributor

Re: Backup and restoring raw devices

be aware there are two issues.

One is the physical data that need
to be restored to disk. As was mentioned earlier either by dd or by a thirdparty
software such as DP (intergrated with rman)

But the second issue are the devices itself.
they are just pointers to the physical location to the disk.

So if in Oracle it points to a device
/dev/vgora/lvora1
/dev/vgora/lvora2

You then need to recreate the device
with lvm and mknod and you will see your data again.

Look before you leap
amrelsayed
Frequent Advisor

Re: Backup and restoring raw devices

hi everybody,

thanks alot for all your replys, but my question is if the third parity product is failed or damaged, i need an offline backup right? so i think the correct offline backup with dd command. please give me your advices.

Best regards
amr
Try To Be Smart
Zinky
Honored Contributor

Re: Backup and restoring raw devices

AS Far as backups of RAW based RDBMS data, you only have a myriad of choices:

(1) Plain and simple old dd
No matter what is said, I've yet to loose a dd backup or an irrecoverable one. It is quite easy to script dd backups to span more than one tape medium.

(2) HW and Software Split mirrors
EMC BCV, HDS HiCOpy, HP BusinessCopy, VxVM (FlashSnap), LVM LVSPLITS

(3) RMAN of course

(4) Commercial Backup Products that have RAW backup capability

Netbackup, Dataprotector, etc.. etc..

Of course if your "third party tool" is broke, you should have contingency plans before hand.

Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Yogeeraj_1
Honored Contributor

Re: Backup and restoring raw devices

hi Amr,

one simple way to do your backup is follows:
Do a RMAN backup to DISK,
then Backup the RMAN backup files to tape or any other media you have at hand.


Of course, this will not work if you have a HUGE database when space may become a problem.

hope this helps!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
amrelsayed
Frequent Advisor

Re: Backup and restoring raw devices

Dear All,

thank you for your greate effort in helping me, and all your suggession will be considered.

thanks a lot.

amr elsayed
Try To Be Smart