Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: RMAN backup strategy on 10g r2 on linux

Re: RMAN backup strategy on 10g r2 on linux

From: Keith <kknauss_at_gmail.com>
Date: 22 Mar 2007 09:00:03 -0700
Message-ID: <1174579203.023514.159710@n59g2000hsh.googlegroups.com>


On Mar 22, 9:28 am, "Cristi" <cmi..._at_gmail.com> wrote:
> I have another script that does backup the archivelog also as
> described in here:http://download-west.oracle.com/docs/cd/B19306_01/backup.102/b14191/r...
>
> RUN {
> ALLOCATE CHANNEL ch1 TYPE
> DISK FORMAT '/oracle_backup/%d_DB_%u_%s_%p.rman';
> BACKUP DATABASE PLUS ARCHIVELOG;
> RLEASE CHANNEL ch1;
>
> }
>
> Reading the output of that seems to do the following using the
> database control file:
> Backup archive log backup set
> Backup full datafile backup set
> Including current control file in backupset
> Including current spfile in backupset
>
> Since I delete all the files from the /oracle_backup folder once they
> are tar'ed and uploaded and for the sake of the argument totally lost
> this is what I believe is happening(please correct my interpretation
> where necessary):
>
> 1) Archives the archivelogs from the last backup until now(so in
> principle I only have the archivelogs since the last backup as I
> deleted the old ones).
> 2) Archives the actual files that store the database giving a snapshot
> in time of the tables and data.
> 3) Archives the control file and spfile.
>
> With this script if ran daily I should be able to fully restore a
> database from a single archived backup plus it will allow me to undo
> changes made to that instance back to up to a day using the only
> available archivelogs? The only data lost would be changes made to the
> database since the last backup?

If this is not yet production, you could try to reinstall dbcontrol. I would suggest a metalink search (and running on a non-prod box) first, but I've done it as:

emca -deconfig dbcontrol db -repos drop -EM_SID_LIST <sid> emca -config dbcontrol db -repos create -EM_SID_LIST <sid>

Also, you should configure the DB for automatic backup of your spfile (hopefully you're using one) and the control file; as well as your retention policy. For example (in RMAN):

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF n DAYS; CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE BACKUP OPTIMIZATION ON; As sysdba:

alter system set control_file_record_keep_time=n;

Also, you may want to have rman backup AND remove your archive logs. If you just go out and delete "old" logs outside of rman, the catalog/ control file will not be "aware" of it. Then you'll end up running rman crosschecks and "delete expired". RMAN can take care of that for you, and save you the hassle. Of course, you never mentioned if you were using the flash recovery area, in which case this becomes moot -- but there are other issues to worry about (e.g. space pressure). For example, keep 1 day of logs that have been backed up:

ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK; DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'sysdate - 1' BACKED UP 1 TIMES TO DEVICE TYPE <where ever>;
RELEASE CHANNEL; The only way you can truely say whether your backup strategy is sufficient, is to do the restore. If you can't do it "in place", find somewhere you can. You do not want to be testing this out -- or figuring out exactly how to do this -- under a live restore scenario.

Good luck. Received on Thu Mar 22 2007 - 11:00:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US