Hi,
What´s the effect of a backup retention policy on BACKUP RECOVERY AREA rman command ?
I have all backups in the FRA, and I would like to make BACKUP RECOVERY AREA to DESTINATION (disk) to have an "alternative" backup, but I am not sure of the effect of this in the backup retention policy of the backups. Will this recovery area backup obsolete the rest of backups in the FRA ?
In the oracle documentation (
http://docs.oracle.com/database/121/BRADV/rcmbckba.htm#BRADV89558 ) I can see that "BACKUP RECOVERY AREA" rman command is considered as a backup of backups, like BACKUP BACKUPSET. And this is what they say:
Viewing the Effect of a Backup Retention Policy on Backups of Backups
For a backup retention policy based on redundancy, a backup set is counted as one instance of a backup. This statement is true even if there are multiple copies of the backup pieces that form the backup set, such as when a backup set has been backed up from disk to tape.
For a recovery window retention policy, either all of the copies of a backup set are obsolete, or none of them are. This point is easiest to grasp when viewing the output of the LIST and REPORT commands.
But I am not sure if this applies to BACKUP RECOVERY AREA command too.
Thank you in advance.
Regards
Oscar
It would appear that the backup of the recover area is included. I'll take a few copies of a tablespace
C:\temp>rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Sat Mar 11 11:07:24 2017
Copyright (c) 1982, 2016, Oracle and/or its affiliates. All rights reserved.
connected to target database: NP12 (DBID=1950473453)
RMAN> backup tablespace example;
Starting backup at 11-MAR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=366 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=C:\ORACLE\ORADATA\NP12\EXAMPLE01.DBF
channel ORA_DISK_1: starting piece 1 at 11-MAR-17
channel ORA_DISK_1: finished piece 1 at 11-MAR-17
piece handle=C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110732_DD6THNGO_.BKP tag=TAG20170311T110732 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 11-MAR-17
RMAN> backup tablespace example;
Starting backup at 11-MAR-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=C:\ORACLE\ORADATA\NP12\EXAMPLE01.DBF
channel ORA_DISK_1: starting piece 1 at 11-MAR-17
channel ORA_DISK_1: finished piece 1 at 11-MAR-17
piece handle=C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110740_DD6THWNP_.BKP tag=TAG20170311T110740 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 11-MAR-17
RMAN> backup tablespace example;
Starting backup at 11-MAR-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=C:\ORACLE\ORADATA\NP12\EXAMPLE01.DBF
channel ORA_DISK_1: starting piece 1 at 11-MAR-17
channel ORA_DISK_1: finished piece 1 at 11-MAR-17
piece handle=C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110745_DD6TJ215_.BKP tag=TAG20170311T110745 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 11-MAR-17
and now take a backup of the FRA
RMAN> BACKUP RECOVERY AREA to destination 'c:\temp\fra';
Starting backup at 11-MAR-17
using channel ORA_DISK_1
specification does not match any archived log in the repository
specification does not match any datafile copy in the repository
channel ORA_DISK_1: input backup set: count=11, stamp=938344052, piece=1
channel ORA_DISK_1: starting piece 1 at 11-MAR-17
channel ORA_DISK_1: backup piece C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110732_DD6THNGO_.BKP
piece handle=C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110732_DD6TO0KM_.BKP comment=NONE
channel ORA_DISK_1: finished piece 1 at 11-MAR-17
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
channel ORA_DISK_1: input backup set: count=12, stamp=938344060, piece=1
channel ORA_DISK_1: starting piece 1 at 11-MAR-17
channel ORA_DISK_1: backup piece C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110740_DD6THWNP_.BKP
piece handle=C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110740_DD6TO1M7_.BKP comment=NONE
channel ORA_DISK_1: finished piece 1 at 11-MAR-17
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
channel ORA_DISK_1: input backup set: count=13, stamp=938344065, piece=1
channel ORA_DISK_1: starting piece 1 at 11-MAR-17
channel ORA_DISK_1: backup piece C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110745_DD6TJ215_.BKP
piece handle=C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110745_DD6TO2O3_.BKP comment=NONE
channel ORA_DISK_1: finished piece 1 at 11-MAR-17
channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01
Finished backup at 11-MAR-17
When we list the backups, the copy of the FRA is not seen a standalone backups but copies of existing backups
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size
------- ---- -- ----------
11 Full 97.28M
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
7 Full 4315525 11-MAR-17 C:\ORACLE\ORADATA\NP12\EXAMPLE01.DBF
Backup Set Copy #1 of backup set 11
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:01 11-MAR-17 NO TAG20170311T110732
List of Backup Pieces for backup set 11 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
11 1 AVAILABLE C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110732_DD6THNGO_.BKP
Backup Set Copy #2 of backup set 11
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:01 11-MAR-17 NO TAG20170311T110732
List of Backup Pieces for backup set 11 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
14 1 AVAILABLE C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110732_DD6TO0KM_.BKP
BS Key Type LV Size
------- ---- -- ----------
12 Full 97.28M
List of Datafiles in backup set 12
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
7 Full 4315551 11-MAR-17 C:\ORACLE\ORADATA\NP12\EXAMPLE01.DBF
Backup Set Copy #1 of backup set 12
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:01 11-MAR-17 NO TAG20170311T110740
List of Backup Pieces for backup set 12 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
12 1 AVAILABLE C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110740_DD6THWNP_.BKP
Backup Set Copy #2 of backup set 12
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:01 11-MAR-17 NO TAG20170311T110740
List of Backup Pieces for backup set 12 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
15 1 AVAILABLE C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110740_DD6TO1M7_.BKP
BS Key Type LV Size
------- ---- -- ----------
13 Full 97.28M
List of Datafiles in backup set 13
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
7 Full 4315570 11-MAR-17 C:\ORACLE\ORADATA\NP12\EXAMPLE01.DBF
Backup Set Copy #1 of backup set 13
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:02 11-MAR-17 NO TAG20170311T110745
List of Backup Pieces for backup set 13 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
13 1 AVAILABLE C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110745_DD6TJ215_.BKP
Backup Set Copy #2 of backup set 13
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
DISK 00:00:02 11-MAR-17 NO TAG20170311T110745
List of Backup Pieces for backup set 13 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
16 1 AVAILABLE C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110745_DD6TO2O3_.BKP
<code>
So when I look at my default redundancy
<code>
RMAN> show all;
RMAN configuration parameters for database with db_unique_name NP12 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\ORACLE\PRODUCT\12.1.0.2\DATABASE\SNCFNP12.ORA'; # default
and then ask for deletion of obsolete backups
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 11 11-MAR-17
Backup Piece 14 11-MAR-17 C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110732_DD6TO0KM_.BKP
Backup Set 11 11-MAR-17
Backup Piece 11 11-MAR-17 C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110732_DD6THNGO_.BKP
Backup Set 12 11-MAR-17
Backup Piece 12 11-MAR-17 C:\ORACLE\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110740_DD6THWNP_.BKP
Backup Set 12 11-MAR-17
Backup Piece 15 11-MAR-17 C:\TEMP\FRA\NP12\BACKUPSET\2017_03_11\O1_MF_NNNDF_TAG20170311T110740_DD6TO1M7_.BKP
you can see the c:\temp\fra copies are included in the list as well.