LVM and VxVM
Showing results for 
Search instead for 
Did you mean: 

Re: Backup and restoring raw devices

Go to solution
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,
Try To Be Smart
Exalted Contributor

Re: Backup and restoring raw devices


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.

Steven E Protter
Owner of ISN Corporation
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
Honored Contributor

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 >

Occasional Advisor

Re: Backup and restoring raw devices

We currently backup our RAC datebases with RMAN and Comvault. Seems to work fine
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

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

Look before you leap
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
Try To Be Smart
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
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
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
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