Keep walking

Whatever you need to grow, just do it faster…

Posts Tagged ‘Backup Strategy’

Why restore before recover? The new Oracle 10g Backup Strategy

Posted by ZyK on 11/11/2009

Delivering Oracle 10g R2 Administration Workshop II we had a closer look at the new recommended backup strategy for Oracle.

With Oracle 10g R2 we can recover datafile copies like we recover the real datafiles.
This gives us the oportunity to recover the entire database without having to restore it from backup first.
Which of course saves very valuable time in case of a disaster.

Here is how you could do it:

- use a “flash recovery area” to store everything needed for recovering, such as:
- an image copy of the entire database
- one incremental backup of the database
- the archived redo logs which have been created since the last incremental backup

The flash recovery area is a location on disk which you specify by the parameter db_recovery_file_dest. It can be changed dynamically without having to restart.
With the also dynamically changeable parameter db_recovery_file_dest_size you can limit the amount of disk space you want to use for this area.

Once you use it rman will create backupserts and image copies of datafiles there by default.

- create an image copy of the entire database:

RMAN > BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY DATABASE;

This will first search for a parent image copy to recover. If there is none yet, it will create one.
If there is an image copy of the database already, it will create an incremental level 1 backup.

- after you have create the first incremental backup for your image copy you can update these image copies of the datafiles by applying the incremental backup to them.

RMAN > RECOVER COPY OF DATABASE;

This is what you do every night.
Then you will have a copy of the database which is always
at least at the level of last night.

In case of a disaster you can now tell rman to just change the locations of the datafiles in the controlfile to the image copies by issuing the following:

RMAN > SWITCH DATABASE TO COPY;
You can only do this in MOUNT.
- Now you are already where you were last night and you only have to recover what has changed since last incremental update without having to restore the database at first.

This is a very handy way to perform recovery.
We were able to switch datafiles to copies before 10g already, but could not incrementally update them.

connect lutz hartmann as sysdba



Posted in Backup/Recovery | Tagged: , , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.