--保留策略为7天
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name HNCCS_PR are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 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; # default
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/oracle/product/11.2.0/db_1/dbs/snapcf_hnccs.f'; # default
run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup as compressed backupset incremental level $BAK_LEVEL filesperset 5 database format '/backup/
bak_lev"$BAK_LEVEL"_%U_%T';
sql 'alter system archive log current';
backup filesperset 20 archivelog all tag='arc_bak' format '/backup/arch_lev"$BAK_LEVEL"_%U_%T';
backup current controlfile tag='ctl_bak' format '/backup/ctl_lev"$BAK_LEVEL"_%U_%T';
backup spfile tag='spfile' format '/backup/spfile_lev"$BAK_LEVEL"_%U_%T';
这是刚备份的,Oracle就自动标记为obsolete了,求ML解决一下
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 208 22-JUL-13
Backup Piece 208 22-JUL-13 /backup/bak_lev"0"_6nofc9ck_1_1_20130722
Backup Set 216 22-JUL-13
Backup Piece 216 22-JUL-13 /backup/spfile_6tofc9fc_1_1_20130722
RMAN> crosscheck backupset 208;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/backup/bak_lev"0"_6nofc9ck_1_1_20130722 RECID=208 STAMP=821437844
Crosschecked 1 objects
RMAN> crosscheck backupset 216;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/backup/spfile_6tofc9fc_1_1_20130722 RECID=216 STAMP=821437932
Crosschecked 1 objects
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
208 Incr 0 80.00K DISK 00:00:01 22-JUL-13
BP Key: 208 Status: AVAILABLE Compressed: YES Tag: DATA_BAK
Piece Name: /backup/bak_lev"0"_6nofc9ck_1_1_20130722
SPFILE Included: Modification time: 05-JUL-13
SPFILE db_unique_name: HNCCS_PR
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
216 Full 80.00K DISK 00:00:00 22-JUL-13
BP Key: 216 Status: AVAILABLE Compressed: NO Tag: SPFILE
Piece Name: /backup/spfile_6tofc9fc_1_1_20130722
SPFILE Included: Modification time: 05-JUL-13
SPFILE db_unique_name: HNCCS_PR
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 208 22-JUL-13
Backup Piece 208 22-JUL-13 /backup/bak_lev"0"_6nofc9ck_1_1_20130722
Backup Set 216 22-JUL-13
Backup Piece 216 22-JUL-13 /backup/spfile_6tofc9fc_1_1_20130722
RMAN> crosscheck backupset 208;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/backup/bak_lev"0"_6nofc9ck_1_1_20130722 RECID=208 STAMP=821437844
Crosschecked 1 objects
RMAN> crosscheck backupset 216;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/backup/spfile_6tofc9fc_1_1_20130722 RECID=216 STAMP=821437932
Crosschecked 1 objects
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
208 Incr 0 80.00K DISK 00:00:01 22-JUL-13
BP Key: 208 Status: AVAILABLE Compressed: YES Tag: DATA_BAK
Piece Name: /backup/bak_lev"0"_6nofc9ck_1_1_20130722
SPFILE Included: Modification time: 05-JUL-13
SPFILE db_unique_name: HNCCS_PR
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
216 Full 80.00K DISK 00:00:00 22-JUL-13
BP Key: 216 Status: AVAILABLE Compressed: NO Tag: SPFILE
Piece Name: /backup/spfile_6tofc9fc_1_1_20130722
SPFILE Included: Modification time: 05-JUL-13
SPFILE db_unique_name: HNCCS_PR