RMAN : RMAN is an Oracle Database client and every DBA’s favorite tool for backup and recovery of the database. We have many RMAN related posts which can help you in all scenarios .
However, today we will see a basic RMAN commands that will show what RMAN offers you. This post is mainly for DBAs who want to explore RMAN from scratch
To connect RMAN for your particular database , you need to use target clause , let us see how
[oracle@dbatesting ~]$ export ORACLE_SID=orcl1
[oracle@dbatesting ~]$ rman target /
Recovery Manager: Release 12.2.0.1.0 - Production on Thu May 9 21:07:59 2019
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL1 (DBID=1383488253)
RMAN>
Just set your ORACLE_SID and give / for your target , your database will connected to your desired database
Every DBA’s second command will be show all where you will see list of configuration with your database .
Note : If your database is new then you will see default configurations for each configuration
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL1 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # 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 '/u01/app/oracle/product/12.2.0.1/db_1/dbs/snapcf_orcl1.f'; # default
Now, if your database has already have some backup taken previously we can check it using list backup command .
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 17.94M DISK 00:00:07 31-JAN-19
BP Key: 1 Status: EXPIRED Compressed: NO Tag: TAG20190131T233122
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_01_31/o1_mf_s_999041482_g56fzs1j_.bkp
SPFILE Included: Modification time: 31-JAN-19
SPFILE db_unique_name: ORCL1
Control File Included: Ckp SCN: 1444586 Ckp time: 31-JAN-19
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 17.94M DISK 00:00:02 10-FEB-19
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20190210T102914
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_02_10/o1_mf_s_999858554_g5zcx47j_.bkp
SPFILE Included: Modification time: 10-FEB-19
SPFILE db_unique_name: ORCL1
Control File Included: Ckp SCN: 1547969 Ckp time: 10-FEB-19
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3 Full 17.94M DISK 00:00:17 10-FEB-19
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20190210T220953
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_02_10/o1_mf_s_999900594_g60nzcsd_.bkp
SPFILE Included: Modification time: 10-FEB-19
SPFILE db_unique_name: ORCL1
Control File Included: Ckp SCN: 1698850 Ckp time: 10-FEB-19
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4 Full 17.94M DISK 00:00:01 10-FEB-19
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20190210T233519
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_02_10/o1_mf_s_999905720_g60sz1lg_.bkp
SPFILE Included: Modification time: 10-FEB-19
SPFILE db_unique_name: ORCL1
Control File Included: Ckp SCN: 1717829 Ckp time: 10-FEB-19
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6 Full 557.34M DISK 00:01:10 09-MAY-19
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20190509T211650
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8ly0x5_.bkp
List of Datafiles in backup set 6
Container ID: 3, PDB Name: JIGI
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
9 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_system_g56fjomp_.dbf
10 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_sysaux_g56fjoqy_.dbf
11 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_undotbs1_g56fjoqz_.dbf
12 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_users_g56fmk1x_.dbf
19 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsa_g60sbrnw_.dbf
20 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsb_g60scc47_.dbf
21 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsc_g60scts8_.dbf
22 Full 1966939 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsd_g60sdjw8_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 543.82M DISK 00:00:28 09-MAY-19
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20190509T211650
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m0dgf_.bkp
List of Datafiles in backup set 7
Container ID: 4, PDB Name: TEST
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
13 Full 1966978 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_system_g5zcg9hv_.dbf
14 Full 1966978 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_sysaux_g5zcg9k5_.dbf
15 Full 1966978 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_undotbs1_g5zcg9k7_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8 Full 498.41M DISK 00:00:22 09-MAY-19
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20190509T211650
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m1hrt_.bkp
List of Datafiles in backup set 8
Container ID: 2, PDB Name: PDB$SEED
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
5 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_system_g56ch5lh_.dbf
6 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_sysaux_g56ch5h5_.dbf
8 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_undotbs1_g56ch5o2_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9 Full 498.41M DISK 00:00:23 09-MAY-19
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20190509T211650
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m29bc_.bkp
List of Datafiles in backup set 9
Container ID: 5, PDB Name: APP_PDB
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
16 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_system_g60nm8qh_.dbf
17 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_sysaux_g60nm8r7_.dbf
18 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_undotbs1_g60nm8r8_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10 Full 1.04G DISK 00:00:51 09-MAY-19
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20190509T212535
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mcqgg_.bkp
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
1 Full 1967272 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_system_g56bzr71_.dbf
3 Full 1967272 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_sysaux_g56c4gwz_.dbf
4 Full 1967272 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_undotbs1_g56c8082_.dbf
7 Full 1967272 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_users_g56c8cf3_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11 Full 557.34M DISK 00:00:35 09-MAY-19
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20190509T212535
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mfgw3_.bkp
List of Datafiles in backup set 11
Container ID: 3, PDB Name: JIGI
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
9 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_system_g56fjomp_.dbf
10 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_sysaux_g56fjoqy_.dbf
11 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_undotbs1_g56fjoqz_.dbf
12 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_users_g56fmk1x_.dbf
19 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsa_g60sbrnw_.dbf
20 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsb_g60scc47_.dbf
21 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsc_g60scts8_.dbf
22 Full 1967300 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsd_g60sdjw8_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
12 Full 543.82M DISK 00:00:29 09-MAY-19
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20190509T212535
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mgwc7_.bkp
List of Datafiles in backup set 12
Container ID: 4, PDB Name: TEST
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
13 Full 1967955 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_system_g5zcg9hv_.dbf
14 Full 1967955 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_sysaux_g5zcg9k5_.dbf
15 Full 1967955 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_undotbs1_g5zcg9k7_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
13 Full 498.41M DISK 00:00:24 09-MAY-19
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20190509T212535
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mhzwb_.bkp
List of Datafiles in backup set 13
Container ID: 2, PDB Name: PDB$SEED
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
5 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_system_g56ch5lh_.dbf
6 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_sysaux_g56ch5h5_.dbf
8 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_undotbs1_g56ch5o2_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
14 Full 498.41M DISK 00:00:32 09-MAY-19
BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20190509T212535
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mjtw6_.bkp
List of Datafiles in backup set 14
Container ID: 5, PDB Name: APP_PDB
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
16 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_system_g60nm8qh_.dbf
17 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_sysaux_g60nm8r7_.dbf
18 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_undotbs1_g60nm8r8_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
15 Full 17.94M DISK 00:00:00 09-MAY-19
BP Key: 15 Status: AVAILABLE Compressed: NO Tag: TAG20190509T212854
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_05_09/o1_mf_s_1007846934_gf8mkyho_.bkp
SPFILE Included: Modification time: 09-MAY-19
SPFILE db_unique_name: ORCL1
Control File Included: Ckp SCN: 1968008 Ckp time: 09-MAY-19
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
16 Full 1.04G DISK 00:00:41 09-MAY-19
BP Key: 16 Status: AVAILABLE Compressed: NO Tag: TAG20190509T213944
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T213944_gf8n68hq_.bkp
List of Datafiles in backup set 16
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
1 Full 1968434 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_system_g56bzr71_.dbf
3 Full 1968434 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_sysaux_g56c4gwz_.dbf
4 Full 1968434 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_undotbs1_g56c8082_.dbf
7 Full 1968434 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_users_g56c8cf3_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
17 Full 557.34M DISK 00:00:32 09-MAY-19
BP Key: 17 Status: AVAILABLE Compressed: NO Tag: TAG20190509T213944
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T213944_gf8n7p03_.bkp
List of Datafiles in backup set 17
Container ID: 3, PDB Name: JIGI
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
9 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_system_g56fjomp_.dbf
10 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_sysaux_g56fjoqy_.dbf
11 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_undotbs1_g56fjoqz_.dbf
12 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_users_g56fmk1x_.dbf
19 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsa_g60sbrnw_.dbf
20 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsb_g60scc47_.dbf
21 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsc_g60scts8_.dbf
22 Full 1968502 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/80C5B383246F06B2E0531201A8C09E95/datafile/o1_mf_tsd_g60sdjw8_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
18 Full 543.82M DISK 00:00:26 09-MAY-19
BP Key: 18 Status: AVAILABLE Compressed: NO Tag: TAG20190509T213944
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T213944_gf8n8skb_.bkp
List of Datafiles in backup set 18
Container ID: 4, PDB Name: TEST
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
13 Full 1968525 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_system_g5zcg9hv_.dbf
14 Full 1968525 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_sysaux_g5zcg9k5_.dbf
15 Full 1968525 09-MAY-19 NO /u01/app/oracle/oradata/ORCL1/8183F1693BDD1468E0531201A8C02271/datafile/o1_mf_undotbs1_g5zcg9k7_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19 Full 498.41M DISK 00:00:21 09-MAY-19
BP Key: 19 Status: AVAILABLE Compressed: NO Tag: TAG20190509T213944
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T213944_gf8n9wrg_.bkp
List of Datafiles in backup set 19
Container ID: 2, PDB Name: PDB$SEED
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
5 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_system_g56ch5lh_.dbf
6 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_sysaux_g56ch5h5_.dbf
8 Full 1441388 31-JAN-19 NO /u01/app/oracle/oradata/ORCL1/datafile/o1_mf_undotbs1_g56ch5o2_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
20 Full 498.41M DISK 00:00:24 09-MAY-19
BP Key: 20 Status: AVAILABLE Compressed: NO Tag: TAG20190509T213944
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T213944_gf8nbp70_.bkp
List of Datafiles in backup set 20
Container ID: 5, PDB Name: APP_PDB
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
16 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_system_g60nm8qh_.dbf
17 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_sysaux_g60nm8r7_.dbf
18 Full 1698582 10-FEB-19 NO /u01/app/oracle/oradata/ORCL1/818DC149F5282394E0531201A8C0C446/datafile/o1_mf_undotbs1_g60nm8r8_.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
21 Full 17.94M DISK 00:00:00 09-MAY-19
BP Key: 21 Status: AVAILABLE Compressed: NO Tag: TAG20190509T214231
Piece Name: /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_05_09/o1_mf_s_1007847751_gf8nchvk_.bkp
SPFILE Included: Modification time: 09-MAY-19
SPFILE db_unique_name: ORCL1
Control File Included: Ckp SCN: 1968730 Ckp time: 09-MAY-19
RMAN>
Crosscheck Backup : This command will check the list of backup available in metadata is physically available or not . If it is physically deleted than it will give an EXPIRED status to those backup
RMAN> CROSSCHECK BACKUP;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_01_31/o1_mf_s_999041482_g56fzs1j_.bkp RECID=1 STAMP=999041488
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_02_10/o1_mf_s_999858554_g5zcx47j_.bkp RECID=2 STAMP=999858556
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_02_10/o1_mf_s_999900594_g60nzcsd_.bkp RECID=3 STAMP=999900611
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/autobackup/2019_02_10/o1_mf_s_999905720_g60sz1lg_.bkp RECID=4 STAMP=999905721
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8lvcdn_.bkp RECID=5 STAMP=1007846211
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8ly0x5_.bkp RECID=6 STAMP=1007846296
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m0dgf_.bkp RECID=7 STAMP=1007846372
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m1hrt_.bkp RECID=8 STAMP=1007846407
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m29bc_.bkp RECID=9 STAMP=1007846433
Crosschecked 9 objects
RMAN>
We can see in above output first backup piece is expired as it is physically deleted from file system.
REPORT OBSOLETE :
In RMAN backups which goes out of retention policy are considered as obsolete backup .
RMAN> REPORT OBSOLETE;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 6 09-MAY-19
Backup Piece 6 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8ly0x5_.bkp
Backup Set 7 09-MAY-19
Backup Piece 7 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m0dgf_.bkp
Backup Set 8 09-MAY-19
Backup Piece 8 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m1hrt_.bkp
Backup Set 9 09-MAY-19
Backup Piece 9 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m29bc_.bkp
Backup Set 10 09-MAY-19
Backup Piece 10 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mcqgg_.bkp
Backup Set 11 09-MAY-19
Backup Piece 11 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mfgw3_.bkp
Backup Set 12 09-MAY-19
Backup Piece 12 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mgwc7_.bkp
Backup Set 13 09-MAY-19
Backup Piece 13 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mhzwb_.bkp
Backup Set 14 09-MAY-19
Backup Piece 14 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mjtw6_.bkp
RMAN>
Delete backup or delete obsolete :
We can delete OBSOLETE backup using delete obsolete command :
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 6 09-MAY-19
Backup Piece 6 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8ly0x5_.bkp
Backup Set 7 09-MAY-19
Backup Piece 7 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m0dgf_.bkp
Backup Set 8 09-MAY-19
Backup Piece 8 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m1hrt_.bkp
Backup Set 9 09-MAY-19
Backup Piece 9 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m29bc_.bkp
Backup Set 10 09-MAY-19
Backup Piece 10 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mcqgg_.bkp
Backup Set 11 09-MAY-19
Backup Piece 11 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mfgw3_.bkp
Backup Set 12 09-MAY-19
Backup Piece 12 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mgwc7_.bkp
Backup Set 13 09-MAY-19
Backup Piece 13 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mhzwb_.bkp
Backup Set 14 09-MAY-19
Backup Piece 14 09-MAY-19 /u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mjtw6_.bkp
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8ly0x5_.bkp RECID=6 STAMP=1007846296
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m0dgf_.bkp RECID=7 STAMP=1007846372
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m1hrt_.bkp RECID=8 STAMP=1007846407
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T211650_gf8m29bc_.bkp RECID=9 STAMP=1007846433
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mcqgg_.bkp RECID=10 STAMP=1007846735
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C5B383246F06B2E0531201A8C09E95/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mfgw3_.bkp RECID=11 STAMP=1007846790
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/8183F1693BDD1468E0531201A8C02271/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mgwc7_.bkp RECID=12 STAMP=1007846836
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/80C541CF0FA65E3FE0531201A8C06FB0/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mhzwb_.bkp RECID=13 STAMP=1007846871
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/orcl1/ORCL1/818DC149F5282394E0531201A8C0C446/backupset/2019_05_09/o1_mf_nnndf_TAG20190509T212535_gf8mjtw6_.bkp RECID=14 STAMP=1007846898
Deleted 9 objects
RMAN>
Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us the Invitation or Follow us:
Telegram Channel: https://t.me/helporacle
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
Joel Perez’s LinkedIn: Joel Perez’s Profile
LinkedIn Group: Oracle Cloud DBAAS
Facebook Page: OracleHelp