Veritas-bu

Re: [Veritas-bu] Question on DB online backups

2011-09-27 11:45:51
Subject: Re: [Veritas-bu] Question on DB online backups
From: Wayne T Smith <WTSmith AT maine DOT edu>
To: veritas-bu AT mailman.eng.auburn DOT edu
Date: Tue, 27 Sep 2011 11:45:35 -0400
Ouch, having an Oracle database without a DBA is like having NetBackup without anyone that knows NetBackup.

There are several ways to do backups of Oracle databases.  These include
  • Cold, full.  You take down the database and backup all associated disk space (data, redolog, and perhaps other types). 
    • Cold backups do not require Oracle archivelog mode.
    • Restoration requires database down or restore to essentially identical setup on a like machine.
    • Restoration is to back to the time of your backup.
    • Note for all backup types: Your file system backups will exclude Oracle managed, as a file system backup of an online Oracle database is insufficient for recovery.  Your file system backup should include the Oracle software home and certain other objects (control files, inventory, oraInst.loc, etc) ... not sure where these are on Windows.
  • Cold, RMAN level 0 and 1.   You write a script that brings the database down, use RMAN to back it up, then start the database again.
    • Note for all RMAN backup types: RMAN is simply the Oracle utility to do backup and restore. 
      • Whereas the above backups were simply of file system disk spaces while the database is down (perhaps using NetBackup or a disk copy utility), RMAN decides what data to copy, where to put it and keeps track where it has put the backup files. 
      • RMAN writes its backups to disk or tape. While it is possible to have RMAN write to disk and then have NetBackup backup the file system data, this is awkward and restoration goes from a simple, automatic process to a time-consuming very difficult process if NetBackup has the data. 
      • The Netbackup solution is to purchase a license that includes the Oracle Agent.  This is a shim that gets installed in the Oracle software home.  RMAN thinks it is backing up to tape (device type "sbt_tape"), but the shim captures the RMAN data and sends it on to your backup server.  It doesn't matter if your backup server uses disk or tape ... everything back at the backup server is transparent to RMAN ... just like NetBackup file system backups.
      • Just like file system cold backups, you need to verify and practice various restore scenarios.  RMAN gives you a much better chance to do the restore you need (and have the necessary backup objects available).
      • RMAN keeps track of the stuff it backs up.  It has two methods.  RMAN will put information about its backups in the Oracle database control files.  RMAN also has a "catalog" feature, which means its backup information is stored in a database someplace.  If you use the RMAN catalog, your restore scenarios are substantially enhanced.  Using an RMAN catalog is NOT required by RMAN nor the Oracle Agent.
      • RMAN has its own retention schemes.  Now you have 2 retentions to worry about ... if either the RMAN retention or the NetBackup retention period expires, your backup data is lost.
    • Hot - Hot backups are taken with the database online.  Hot backups require archivelog mode set in the database, which means that changes to the database, as recorded in the redologs that any Oracle database has, are copied to archive redo logs.  Archivelog mode along with database backups allow one to restore/recover to a point in time of your choice (that is, all committed changes at any point in time).  Depending on your requirements, these archive redo logs must be saved for as far back as you might wish to do a restore.
      • Hot backups do not require RMAN.  One may put an Oracle tablespace (collection of related data files) in backup mode, backup (by disk copy, NetBackup user backup, or whatever) and then remove backup mode.  While this can be done I strongly suggest you don't, for I predict you will not be able to do the restore you want one day.
      • RMAN is the tool of choice for hot backups.  Again, backup may be to RMAN disk or tape. 
        • I backup many databases using the NetBackup Oracle Agent.  With an appropriately written script to control the backups, once can invoke a backup on the client as well as having scheduled Netbackup backups.  These backups have several setups you must perform:
          • Write or find a working script
          • setup RMAN configuration
          • setup NetBackup server configuration
          • In addition, depending on your NetBackup version/platform, you may have to install the Oracle Agent separately from the NetBackup client (older versions only, I think) and you may have a configuration step to link the Oracle Agent into the Oracle software home (one does on Linux and Solaris)
        • I backup many database directly to disk, where the disk is an NFS (CIFS in your case) share on a de-dup disk storage appliance.  This is also my future direction.  Pros include no Oracle Agent install and licensing (nor NetBackup, for that matter!) and simpler problem resolution(NetBackup status codes are not sufficient for backup success); cons include no NetBackup scheduling and NetBackup or StorageScape reporting.  One must script or periodically manually check that backups are being done.
So, if you have an Oracle DBA, you really want her intimately involved in backups.

The above describes the case with database on standard disk.  If you use oracle ASM, you really need a DBA, IMHO.

The above does not discuss the flashback, formerly fast recover area and its relationship to more comprehensive backup and recovery ... something that can be very useful to quick database recovery.

The above does not discuss the export/import and data dump utilities that may have a place in backup and recovery of your database.

I hope it helps, though!    ;-)

Cheers, Wayne

On Mon, Sep 26, 2011 at 1:33 PM, WEAVER, Simon (external) <simon.weaver AT astrium.eads DOT net> wrote:

Hi, this is really for anyone doing online Oracle Backups?
Trying to create a new policy for this. Got agent installed (licensed). Environment all Windows 2003.

All I want is to do an online Oracle Backup. But I am struggling with this, as I have no DB Support.

Being told that backing up Oracle is huge excercise and needs time. Trouble is, I wasnt expecting this sort of response.

Does anyone have advise or a script or something I could try and use to perform an Oracle Backup?

At the moment, I stop services, then do backup & start services. But Im not sure that is good practice. while Oracle Down, application is down. Hence, no one works!!!

Any input appreciated. I have and am still using Admin guide, but I wanted real world advice here. I got a sample Hot Oracle DB Backup from the goodies directory, but not sure if this is right way to do it.

Goal is to get a backup while application online. I do tons of online SQL, and no issues with backups..... Yet apparantly Oracle is more complex !!!

News to me... But feedback welcome
Thanks

Regards

Simon


_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
<Prev in Thread] Current Thread [Next in Thread>