We publish the RMAN config that is optimal for the Oracle database with or without standby servers.
During the creation process, the best practices and documentation were studied.
This article does not cover creating / using incremental backups. Full + archivelogs only.
Challenge: optimal and universal Oracle RMAN config for databases with or without standby servers.
With the storage of 1-2 backups (before the next backup, 1 of the two oldest is deleted).
The backup should keep the archivelog accumulated from the previous backup run.
archivelog should not be deleted unless applied to at least one standby server.
RMAN read speed is limited to 50MB / s to reduce the load on the database disk system.
Create a text file file backup_base.rman
Code language: PHP (php)
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; CONFIGURE BACKUP OPTIMIZATION OFF; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET; #CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK; CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY BACKED UP 1 TIMES TO DEVICE TYPE DISK ; CONFIGURE SNAPSHOT CONTROLFILE name clear; CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'd:\%d_backup\%U' MAXPIECESIZE 32768 M RATE 50 M; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\%d_backup\%F.bck'; CROSSCHECK BACKUP; crosscheck copy of controlfile; DELETE EXPIRED BACKUP; delete obsolete; backup AS COMPRESSED BACKUPSET database plus archivelog not backed up delete input;
The CONFIGURE lines are needed to control / set the RMAN config / settings before each backup.
This is convenient for precise control over what parameters / settings are being backed up.
If there are no StandBy Servers, then
Code language: CSS (css)
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK; #CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY BACKED UP 1 TIMES TO DEVICE TYPE DISK;
for daily launch, you can create a bat-file (in a Linux shell script, change the paths and make it executable)
Code language: HTML, XML (xml)
set oracle_sid=base_sid<br> c:\oracle\product\11.2.0\dbhome_1\BIN\rman target / @C:\Backup\backup_base.rman