Contents:-
Oracle Backup Retention Concept, Configure Backup Setting, Show Existing
Company Backup Policy
Retention
Policy
A
retention policy specifies which backup will be kept and for how long.
There are
two types of retention policy
Recovery
Window
Establishes
a period of time within which point-in-time recovery is possible.
Rman> Configure
retention policy to recovery window of <days> days;
If you
are not using a recovery catalog, then you should keep the recovery
window time period <= the value of the control file parameter
CONTROL_FILE_RECORD_KEEP_TIME to prevent the record of older backups from being
overwritten in the control file. And if you are using a recovery catalog, then
make sure that CONTROL_FILE_RECORD_KEEP_TIME is greater than the time period
between catalog resynchronization.
Catalog
Resynchronization happens when you
Create a backup. In this case synchronization is done implicitly.
Execute the resync catalog command.
Redundancy
Establishes
a fixed number of backup that must be kept.
Rman> Configure
retention policy to redundancy <copies>;
Disable
Retention Policy
Rman >Configure
retention policy to none;
Backup Setting
Show all
Existing Backup Setting.
$> rman target /
Rman> show all;
Rman> show exclude;
Rman> show controlfile autobackup format;
Or
$> sqlplus sys as sysdba
Sql> select * from v$rman_configuration;
Configure New
Backup Setting
$> rman
target /
Controlfile
Autobackup Setting
Rman> configure
controlfile autobackup format for device type disk to
‘/u01/app/oracle/backup/controlfile/%F’;
With a
control file autobackup, RMAN can recover the database even if the current
control file, recovery catalog, and server parameter file are inaccessible.
RMAN Can search for and restore the server parameter file or control file from
that autobackup.
Use
multiple Streams of data
Rman>
configure device type sbt parallelism 3;
Parallelism
is the number of streams of data that can be used to read from and write to the
device. For example:- if the media manager has two tape drives available, then
parallelism 2 would allow both tape drives to be used simultaneously for backup
command using that media manager.
Use Clear
option to reset to default setting.
Rman>
configure retention policy to clear;
configure
and allocating channels.
Rman>
configure default device type to disk;
Rman>
configure default device type to tape;
Configure
backup setting for multiple copies of backup set
Rman>
configure archivelog backup copies for device type disk to 2;
Rman>
configure Datafile backup copies for device type disk to 2;
Rman>
backup database plus archivelog ; -- two copies of backup are made to two
different disks.
Note:-
This setting only applies to all backups except control file autobackups
because the autobackup of a control file always produces one copy.
Note:- rman can make up to 4
backup copies of backup set simultaneously, each an exact duplicate of others.
duplex backup set can only apply to backup set and can not apply to image
copies.
Configure
Backup Optimization
When
enable backup optimization , the backup command skips files when identical
files have already been backed up.
Rman>
configure backup optimization on;
To
Override backup optimization
Rman>
backup device type disk backupset all force;
Configure
Compression Backup
Backup
compression can be used skip the backup of unallocated blocks as well as unused
blocks.
Available
compression algorithm are HIGH, MEDIUM,BASIC and LOW.
Rman> configure
compression algorithm ‘HIGH/ MEDIUM/LOW/BASIC’;
Encryption
Backup
Transparent
Encryption: With a
Wallet (default)
Password
Encryption:
With a password. ( no wallet)
Dual Mode
Encryption
has both transparent and password encryption modes.
Spool
backup
Rman> spool
log to ‘/u01/app/oracle/backup/backup_log.txt’;
No comments:
Post a Comment