Home » Oracle » Oracle Database » RMAN List backup commands

RMAN List backup commands

RMAN List backup is a useful command to list the backup taken in the system. It shows all the details about the backup taken, what time it was taken, location of the backup.

First, you need to connect with the Target database with or without a catalog and then these commands can be run. If you have lost your Target database, then these listings can be obtained by connecting to the catalog and then setting the DBID

$ORACLE_HOME/bin/rman target /
or
$ORACLE_HOME/bin/rman TARGET / CATALOG rman/pass@db

LIST BACKUP

List all the backup taken in the system

RMAN> LIST BACKUP;

List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
12499 Incr 0 256.00K SBT_TAPE 00:00:13 28-FEB-18
BP Key: 12499 Status: AVAILABLE Compressed: NO Tag: TEST_WH_18-02-28_01
Handle: TEST_u3tr1gqe_1_1_1001440078 Media: @aaabh
List of Datafiles in backup set 12499
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
11 0 Incr 22724608954091 28-FEB-18 /u01/oracle/TEST/datafile/applsysd01.dbf
12 0 Incr 22724608954091 28-FEB-18 /u01/oracle/TEST/datafile/applsysd02.dbf
13 0 Incr 22724608954091 28-FEB-18 /u01/oracle/TEST/datafile/applsysd03.dbf

LIST BACKUP SUMMARY

List backup summary provides the summary of the backup taken of the database using RMAN

RMAN> LIST BACKUP SUMMARY;

LIST BACKUP BY FILE

This command prints the backup by file

RMAN> LIST BACKUP BY FILE;

List of SPFILE Backups
======================

Modification Time BS Key S #Pieces #Copies Compressed Tag
----------------- ------- - ------- ------- ---------- ---
02-JAN-18 8799 A 1 1 NO TEST_MH_18-03-02_06
02-JAN-18 8741 A 1 1 NO TEST_WH_18-02-23_06
02-JAN-18 8683 A 1 1 NO TEST_WH_18-02-16_06
02-JAN-18 8625 A 1 1 NO TEST_WH_18-02-09_06
02-JAN-18 8567 A 1 1 NO TEST_MH_18-02-02_06
02-JAN-18 8509 A 1 1 NO TEST_WH_18-01-26_06

LIST BACKUP OF DATABASE

To list all existing Oracle database backups which can be used

RMAN> LIST BACKUP OF DATABASE;

LIST BACKUP OF DATABASE BY BACKUP

To list all existing database backups by backup which can be used

RMAN> LIST BACKUP OF DATABASE BY BACKUP;

LIST BACKUP OF TABLESPACE

This command can be used to list backups of individual tablespace

RMAN> LIST BACKUP OF TABLESPACE SYSTEM;

RMAN> LIST BACKUP OF TABLESPACE USERS;

LIST BACKUP OF TABLESPACE SUMMARY

This command can be used to list backup summaries of individual tablespace

RMAN> LIST BACKUP OF TABLESPACE <tablespace_name> SUMMARY;

LIST BACKUP OF DATAFILE

This command can be used to list backups of individual datafile

RMAN> LIST BACKUP OF DATAFILE <file #>;

RMAN> LIST BACKUP OF DATAFILE 1;

RMAN> LIST BACKUP OF DATAFILE 2;

LIST BACKUP OF DATAFILE SUMMARY

This command can be used to list backup summary of individual datafile

RMAN> LIST BACKUP OF DATAFILE <file #> SUMMARY;

RMAN> LIST BACKUP OF DATAFILE 1 SUMMARY;

RMAN> LIST BACKUP OF DATAFILE 2 SUMMARY;

LIST BACKUP OF CONTROLFILE

This command can be used to list backup of the control file

RMAN> LIST BACKUP OF CONTROLFILE;

LIST BACKUP OF CONTROLFILE SUMMARY

This command can be used to list backup summary  of the control file

RMAN> LIST BACKUP OF CONTROLFILE SUMMARY

List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
1035 B 0 A SBT_TAPE 01-DEC-18 1 1 NO TAG20181201T061138
1039 B F A SBT_TAPE 01-DEC-18 1 1 NO TAG20181201T061138

LIST BACKUP OF ARCHIVELOG ALL

This command can be used to list archive log backup of the database

RMAN> LIST BACKUP OF ARCHIVELOG ALL;

BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
8801 44.50M SBT_TAPE 00:00:44 02-MAR-19
BP Key: 8801 Status: AVAILABLE Compressed: NO Tag: TAG01
Handle: TEST_MH_18-03-02_06:00_GMT_T-1_S-2469 Media: @aaabh

List of Archived Logs in backup set 8801
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1469 302935773 02-MAR-18 302943586 02-MAR-18

LIST BACKUP OF ARCHIVELOG FROM SEQUENCE

This command can be used to list archive log backup from a given sequence

RMAN> LIST BACKUP OF ARCHIVELOG FROM SEQUENCE <seq_no>

LIST BACKUP OF ARCHIVELOG FROM TIME

This command can be used to list archive log backup from a given time

RMAN> LIST BACKUP OF ARCHIVELOG FROM TIME 'sysdate-1';

LIST BACKUP OF ARCHIVELOG ALL COMPLETED

RMAN> LIST BACKUP OF ARCHIVELOG ALL COMPLETED BEFORE 'sysdate-2';

LIST BACKUPSET 

The below command can be to list the backupset taken

RMAN> LIST BACKUPSET SUMMARY;
RMAN> LIST BACKUPSET 109;
RMAN> LIST BACKUPSET OF DATAFILE 1;

LIST BACKUP TAG

We can list the backup using tag also

RMAN>list backup of database summary tag='TECH';
RMAN>list backup of database tag='TECH';

LIST BACKUP OF SPFILE

RMAN>list backup of spfile;

Time-related List backup command

RMAN> list backup completed between 'sysdate -1' and 'sysdate';
RMAN> list backup completed between 'sysdate -14' and 'sysdate -7';
RMAN> list backup of database completed between 'sysdate -7' and 'sysdate';
RMAN> list backup of database completed between "to_date('01/10/2018','dd/mm/yyyy')" and "to_date('09/10/2018','dd/mm/yyyy')";
RMAN> LIST backup of database completed after "to_date('01/10/2018','mm/dd/yyyy')";
RMAN> list backup of database completed between "to_date('01/10/2018','dd/mm/yyyy')" and "to_date('08/10/2018','dd/mm/yyyy')";

RMAN> list backup of archivelog from time "to_date('01/10/2018 22:00:00', 'dd/mm/yyyy hh24:mi:ss')" until time "to_date('08/10/2018 04:00:00', 'dd/mm/yyyy hh24:mi:ss')";
RMAN> list backup of archivelog time between "to_date('01-JAN-2018 00:00:00','DD-MON-YYYY HH24:MI:SS')" and "to_date('08-JAN-2018 00:00:00','DD-MON-YYYY HH24:MI:SS')";
RMAN> list backup of archivelog time between "to_date('01/08/2018','dd/mm/yyyy')" and "to_date('09/08/2018','dd/mm/yyyy')";
RMAN> list backup of archivelog from time "to_date('01-12-2018','mm-dd-yyyy')";

RMAN> list backup of archivelog from time "to_date('01/08/2018 22:00:00', 'dd/mm/yyyy hh24:mi:ss')" until time "to_date('08/08/2018 04:00:00', 'dd/mm/yyyy hh24:mi:ss')";

RMAN> list backup of spfile completed between "to_date('01-SEP-2018 00:00:00','DD-MON-YYYY HH24:MI:SS')" and "to_date('08-SEP-2018 00:00:00','DD-MON-YYYY HH24:MI:SS')";

RMAN> list backup of controlfile completed between "to_date('01-AUG-2018 00:00:00','DD-MON-YYYY HH24:MI:SS')" and "to_date('08-AUG-2018 00:00:00','DD-MON-YYYY HH24:MI:SS')";
RMAN> list backup of datafile 1 completed between 'sysdate -10' and 'sysdate';

RMAN> list backup of tablespace SYSTEM completed between 'sysdate -10' and 'sysdate';

RMAN> list backup of datafile 1 completed between '06-OCT-2018' and '25-DEC-2018';

Hope you like this RMAN list backup command post. Please do provide feedback. I will keep on adding the command as and when I encounter them

See also  Autoconfig In Oracle R12

Also Reads
RMAN Backup Commands: Check out the RMAN Backup commands in this post. This is going to be very helpful for the person who is involved in backup and recovery
Oracle RMAN interview questions: Oracle RMAN Interview Questions are a must for Oracle DBAs looking for a change. Oracle Backup and recovery is one of the essential duties of Oracle DBA
Oracle DBA interview questions for experienced professionals: check out awesome Oracle DBA interview questions and answers to succeed in any Oracle database interviews. This will test your knowledge on various fronts
RMAN-06059: Check out how to resolve the RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
RMAN-20004: RMAN-20004 happens when a Database has been cloned and a connection is made from the clone to the Catalog using rman without changing the DBID of the clone
RMAN Crosscheck : check out this post on RMAN crosscheck command, Crosscheck backup, crosscheck archivelog all, Crosscheck backup
RMAN Catalog Command: Check out this post on How to use RMAN Catalog Command, rman catalog start with, catalog the backup pieces on tape,rman catalog backuppiece
https://docs.oracle.com/cd/B19306_01/backup.102/b14192/bkup007.htm

5 thoughts on “RMAN List backup commands”

  1. How would perform ‘Iist backup’ on a recovery catalog database. If I no longer have a connection to the target database.

    1. hi

      You can connect like this
      rman catalog Set DBID=’‘;

      Then list backup will work good
      Also you can find DBID using the query in catalog database
      SELECT db_key, dbid, name FROM rc_database WHERE name = ‘‘;

      thx

      1. Hi . How can I get Time-related List backup commands to work in that scenario of no connection to target database. I’ve set the DBID and I’m able to run the basic list commands like. LIST BACKUP…

        HOwever, when I try to make time-related commands it returns an error.

        RMAN> list backup completed between ‘sysdate -14’ and ‘sysdate -7’;

        RMAN-00571: ===========================================================
        RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
        RMAN-00571: ===========================================================
        RMAN-03002: failure of list command at 12/14/2021 12:45:17
        RMAN-06171: not connected to target database

        HOw can I fix this and get it to work with time-related commands.

  2. Pingback: Most Used RMAN List backup commands – Techgoeasy – Dinezh.com

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top