VMware

This Question is Answered

1 "correct" answer available (10 pts)
11 Replies Last post: Mar 19, 2007 8:33 AM by petedr  

How to backup a running VM with oracle database ? posted: Mar 18, 2007 3:40 AM

Click to view zemotard's profile Expert 609 posts since
Jan 9, 2006
Hi, how to backup a running VM with oracle database ?

My advise is to set the dabatase in backup mode, then launch a snapshot on the vm then set the database in normal mode.

But you can I synchronise all this step ?
Is it possible to launch a script via SSH from VM to ESX in order to launch the snapshot ?

Regards.
Click to view esiebert7625's profile Guru User Moderators vExpert 6,795 posts since
Oct 23, 2006
Here's some good backup guides...

Virtual Machine Backup Guide - http://www.vmware.com/pdf/vi3_vm_backup.pdf
Consolidated Backup in Vmware Infrastructure 3 - http://www.vmware.com/pdf/vi3_consolidated_backup.pdf
Vmware Consolidated Backup Best Practices, Tips and Tricks - http://download3.vmware.com/vmworld/2006/bct4540.pdf

Also check out these...

vmbk.pl ( free ) http://www.vmts.net/vmbk.htm
ESX Ranger ( Graphical, Windows based ) http://vizioncore.com
esXpress ( no personal experience ) http://esxpress.com
Backup scripts - http://www.rtfm-ed.co.uk/?p=23 and http://www.rtfm-ed.co.uk/?p=156
http://www.vmware.com/community/thread.jspa?messageID=475244&#475244

If you find this post helpful, please award points...thanks

Re: How to backup a running VM with oracle database ?

3. Mar 18, 2007 12:00 PM in response to: zemotard
Click to view petedr's profile Master 1,428 posts since
Mar 18, 2006
We run the Oracle application Suite (11.5.9) and Oracle database 9.2.0.2, OS Red Hat AS2.1

We use esXpress to backup our Oracle VM for us. Works great, no problems.
Click to view petedr's profile Master 1,428 posts since
Mar 18, 2006
Assuming you are talking about putting your Tablespaces into Backup Mode.

We haven't had the need. The backup approach we take it at the full VM (vmdk level ), therefore we get the entire virtual machine. There have been many discussions of hot VM backups and database quiescing but so far we have not any issues.

This approach had been tested many times, restores for duplicate environments, in DRP situations and recently to resolve a database corruption issue where we needed to restore a specific Table.
Click to view mittell's profile Champion 3,096 posts since
Apr 25, 2006
It's not, it's crash consistent. To have a consistent backup of your Oracle databse you'll need to quiesce the database from within the VM prior to export.
Click to view davidbarclay's profile Master 1,103 posts since
Sep 20, 2006
Make sure you do NOT have the VM Tools "File Sync Driver" installed - it will eventually break your database!

Secondly, you MUST use a script of sorts to ensure your DB is consistent. You can use pre-freeze-script.bat and post-thaw-script.bat to launch whatever you need to.

This can be as crude as stopping and starting the services or as elegant as using VSS (a little tricky, but it does work).

Have fun...or at least try to :)

Dave
Click to view petedr's profile Master 1,428 posts since
Mar 18, 2006
Search through the forums, there have been a lot of discusscions on crash consistent backups and quiescing the database. The approach we are using works for us.

Also as was stated on this post do beware of the VmTools File Sync driver.

Thanks for the helpful. good look with your environment.
Click to view kix1979's profile Champion User Moderators 3,769 posts since
Oct 14, 2004
As others have said, the ONLY way to use VMware's snapshot technology to create a consistent backup is to call a pre-freeze/post-thaw tool or something that can leverage VSS during the snapshot process. Otherwise your database is no quiesced, and if that is a production database, it is not 100% consistent.

Kix
Click to view petedr's profile Master 1,428 posts since
Mar 18, 2006
One additional think I wanted to mention about backing up Oracle databases at the vmdk level.

Its important to have the control files in the same vmdk as the database. In that if you restore a single vmdk you have everything related to the database.

We do seperate the applications, OS and linux file systems. Our production box is set as follows: Each file systems is a seperate vmdk
/apps - application and database executables
/data - Oracle database files, control files, redos
/ - Linux OS
/u - misc directories
swap

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities