Common RMAN parameter settings
View All RMAN configurations
RMAN> show all;
RMAN configuration parameters for database with db_unique_name Oracle007 are:
Configure retention policy to recovery window of 7 DAYS; ------ backup files are saved for 7 DAYS by default (if not overwritten, they may be saved for more than 7 DAYS)
Configure backup optimization off; # default
Configure default device type to disk; # default
Configure controlfile autobackup off; # default
Configure controlfile autobackup format for device type disk to '% F'; # default
Configure device type disk parallelism 1 backup type to backupset; # default
Configure datafile backup copies for device type disk to 1; # default
Configure archivelog backup copies for device type disk to 1; # default
Configure maxsetsize to unlimited;
Configure encryption for database off; # default
Configure encryption algorithm 'aes128 '; # default
Configure compression algorithm 'basic 'as of release 'default' optimize for load true; # DEFAULT
Configure archivelog deletion policy to none; # default
Configure snapshot controlfile name to '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_oracle007.f'; # default
You only need to change the preceding parameters for the configuration command.
Set the FORMAT String
Configure controlfile autobackup format for device type disk to '% F ';
FORMAT String formatting
The following replace variables can be used when the FORMAT parameter is used:
% A: The activation ID of the Oracle database is RESETLOG_ID.
% C: number of copies of the backup fragment (starting from 1, up to 256 ).
% D: O racle database name.
% D: The day in the current time, in the format of DD.
% E: the archive sequence number.
% F: absolute file number.
% F: the unique name based on "DBID + time", in the form of c-IIIIIIIIII-YYYYMMDD-QQ, where iiiiiiii is the database DBID, YYYYMMDD is the date, QQ is a 1 ~ 256.
% H: the archiving log thread number.
% I: The DBID of the O racle database.
% M: the month in the current time, in the format of MM.
% N: tablespace name.
% N: database name, which is filled with x characters on the right side to keep it 8 characters long. For example, if the database name is JSSBOOK, the generated name is JSSBOOKx.
% P: ID of the backup part in the backup set, starting from 1.
% S: Backup set number.
% T: The timestamp of the Backup set.
% T: the format of YYYYMMDD ).
% U: an 8-character name consisting of the Backup set number and the creation time after compression. You can use % u to generate a unique name for each backup set.
% U: The default value is % u _ % p _ % c, which can be used to generate a unique name for each backup segment (that is, the disk file, this is the most common naming method. The rules generated for different backup operations are also different, as shown below:
% U = % u _ % p _ % c;
% U = data-D-% d_id-% I _TS-% N_FNO-% f _ % u;
% U = arch-D _ % d-id-% I _S-% e_T-% h_A-% a _ % u;
% U = cf-D _ % d-id-% I _ % u when generating the control file image copy.
% Y: year in the current time, in the format of YYYY.
Set the FORMAT String
Retention policy refers to the RMAN backup retention policy.
Configure retention policy to redundancy 1; indicates that the Backup REDUNDANCY is 1, that is, the latest backup is retained (the backup required for database recovery, such as full backup ).
Configure retention policy to recovery window of 60 DAYS; indicates that the backup can be recovered for a period OF less than 60 DAYS. All the required backups are retained.
After the retention policy is defined, you can use crosscheck backup; and delete obsolete; to delete unnecessary backups.
If you use catalog, you only need to care about the retention policy. Do not worry about control_file_record_keep_time.
If controlfile is used, control_file_record_keep_time will also affect the record of the backup record in controlfile. Therefore, when using controlfile, it is best TO set control_file_record_keep_time TO a larger value than configure retention policy to recovery window of 60 DAYS; set the number of days.
-------------------------------------- Recommended reading --------------------------------------
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption
-------------------------------------- Split line --------------------------------------