Re: VMWARE Snapshots to backup Oracle

  • From: Niall Litchfield <niall.litchfield@xxxxxxxxx>
  • To: Mark.Bobak@xxxxxxxxxxxx
  • Date: Wed, 7 Jul 2010 10:15:36 +0100

First of all I'd like to say that I agree with Mark below for snapshots of
databases. Or indeed hot backup full stop. I may be misunderstanding this,
but I didn't think that VMWare snapshots were directly comparable to storage
snapshots of filesystems, in particular since they also snapshot the memory
state of the machine at the time - though this is optional. In this sense
isn't a VMWare snapshot comparable to a noarchivelog mode backup (albeit
probably of a running instance) - i.e you rewind the entire machine to 12:00
pm in Mark's scenario below and lose the work from 12 - 2. It seems to me
that most of this discussion seems to be around storage snapshots of the
database mount points.

Or am I just lala again.

Niall

On Wed, Jul 7, 2010 at 3:28 AM, Bobak, Mark <Mark.Bobak@xxxxxxxxxxxx> wrote:

> Hi Dave,
>
> This is no different than any other hot backup.  You put database into
> backup mode, and copy off the datafiles, exit backup mode.  Then, you can
> use 'alter database backup controlfile....' to take a logical or physical
> backup of the controlfile.  But, do *not* backup the online redo logs.
>
> Suppose you take a hot backup (snapshot or otherwise) with tablespaces all
> in backup mode, at 12:00pm.  Suppose you *did* take a backup of the online
> redo as part of that backup/snapshot.  Now, at 2:00pm, your database
> crashes.  So, what happens?  You restore all files from the snapshot,
> *including* the online redo.  Now, remember, that online redo is from
> 12:00pm.  You want to recover to 2:00pm, when the crash occurred.  So, you
> have your archivelog backups.  So, you put database into recovery mode
> (recover database), and start applying logs.  Now, suppose the last
> archivelog you apply is from 1:55pm.  Where are the last remaining
> transactions from 1:55pm till 2:00pm?  They're in the online redo!  But,
> you've overwritten it, with the data from 12:00p, which is useless, and, by
> the way, was already archived off, shortly after 12:00pm, and has been
> applied to the database.  So, now you're stuck.  You lost the data from the
> current online redo when you did the restore, and your
>  online redo is from 12:00pm (backup time), which is useless to you.  So,
> your only option is to do an incomplete recovery, open resetlogs, and
> explain to your boss why you lost all the transactions from 1:55pm-2:00pm.
>
> Now, you could argue that, in the above circumstance, you simply don't
> restore the online redo, and you'll be fine.  That's true, (assuming that
> the snapshot technology you're using will allow for you to specify which
> files do and don't get restored), but, tell me, why backup the on-line redo
> in the first place?  Show me a valid recovery scenario, from a hot backup,
> that requires a copy of the on-line redo to be in the backup set.  I'm not
> aware of any such scenario.  Can you think of one?
>
> Cold backups are a bit different.  I always argue against backing up online
> redo with cold backup either.  People always argue that the online redo is
> required if the database was not consistent (i.e. cleanly shutdown) when
> backup was done.  And, I'd argue that if that's how you're doing cold
> backups, you're doing it wrong.  (Though, I think I'd first wonder why the
> heck you're doing cold backups in the first place!)
>
> The only valid scenario that I can think of, where you *want* to include
> the online redo, is if you want a *restartable* snapshot, rather than a
> *recoverable* snapshot.  Keep in mind, that restartable snapshot can only be
> used to restore the database to the point in time when the snapshot was
> taken.  It's not recoverable, and cannot be rolled forward to a point in
> time.
>
> Hope that helps,
>
> -Mark
> ________________________________________
> From: oracle-l-bounce@xxxxxxxxxxxxx [oracle-l-bounce@xxxxxxxxxxxxx] On
> Behalf Of David Roberts [big.dave.roberts@xxxxxxxxxxxxxx]
> Sent: Tuesday, July 06, 2010 21:36
> To: oracle-l
> Subject: Re: VMWARE Snapshots to backup Oracle
>
> "Danger, Will Robinson, Danger"
>
> Why would enabling backup mode, mean that backups of online redo logs
> are not required?
>
> If you do a snapshot of the database while online, by implication the
> backup will only be useful after recovery, and the redo logs would be
> vital to guarantee the recovery?
>
> Perhaps, I've missed something, please correct me if I'm wrong.
>
>
> Dave
>
> On Tue, Jul 6, 2010 at 5:24 PM, Bobak, Mark <Mark.Bobak@xxxxxxxxxxxx>
> wrote:
> > Right.  If you do begin backup/end backup, you should *not* snapshot
> online
> > redo, and you get a recoverable snapshot.  If you do *not* do begin/end
> > backup, you *should* snapshot the online redo logs, and you get
> restartable
> > snapshot.
> >
> >
> >
> > Hope that helps,
> >
> >
> >
> > -Mark
> >
> >
> >
> > From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:
> oracle-l-bounce@xxxxxxxxxxxxx]
> > On Behalf Of Andrew Kerber
> > Sent: Tuesday, July 06, 2010 12:19 PM
> > To: post.ethan@xxxxxxxxx
> > Cc: oracle-l
> > Subject: Re: VMWARE Snapshots to backup Oracle
> >
> >
> >
> > I am not using it, but I understand that it works as long as you use the
> > alter database begin backup command prior to taking the snapshot (and the
> > alter database end backup command after taking it).
> >
> > On Tue, Jul 6, 2010 at 10:18 AM, Ethan Post <post.ethan@xxxxxxxxx>
> wrote:
> >
> > Anyone using snapshots to backup Oracle? Does it work? Anything I need to
> > know?
> >
> >
> > --
> > Andrew W. Kerber
> >
> > 'If at first you dont succeed, dont take up skydiving.'
> --
> //www.freelists.org/webpage/oracle-l
>
>
>
>
> --
> //www.freelists.org/webpage/oracle-l
>
>
>


-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info

Other related posts: