Oracle RMAN List Backup of Database Command
Oracle RMAN List Backup of Database Command
Purpose
The LIST BACKUP OF DATABASE command is an Oracle Recovery Manager (RMAN) command that displays the database backups recorded in the RMAN repository. This command helps database administrators verify backup availability, review backup history, and plan recovery operations by providing detailed information about all datafile backups for the target database.
Code
1list backup of database;
Breakdown of Code
The command consists of three main components that work together to query the RMAN repository:
- LIST: The primary RMAN command that queries and displays backup metadata from the repository
- BACKUP: Lists backup sets (with their backup pieces) and proxy copies. Image copies are listed by
LIST COPYinstead - OF DATABASE: Restricts the list to backups of the entire database's data files. Archived log backups need
OF ARCHIVELOG, and the current control file and server parameter file have their ownOF CONTROLFILEandOF SPFILEoptions
How It Works
When you execute this command at the RMAN prompt, it connects to the RMAN repository and retrieves all backup records for database datafiles. The repository can be stored either in the target database control file or in a separate recovery catalog database. By default the output is verbose and multiline: for each backup set it shows the backup set key, the type (Full or Incr), the level, the size, the device type and the completion time, followed by detail on its backup pieces. Add SUMMARY for one line per backup.
Key Points
- Repository requirement: RMAN must be connected to a target database, and if no recovery catalog exists, the target database must be mounted or open
- Scope specificity: The command lists backup sets that hold data files. If such a backup set also holds the control file or server parameter file, the verbose output shows
Control File IncludedorSPFILE Includedrows for it - Backup verification: The summary output includes a status column showing whether backups are available (A), unavailable (U), or expired (X)
- Level information: Level 0 and level 1 are both incremental levels. A full (non-incremental) backup shows
Fullin the verbose Type column andFin the summary LV column, not level 0 - Multitenant: In a container database (CDB),
DATABASEmeans the whole CDB, so the command lists backups of the whole CDB
Output Information
With the SUMMARY option (LIST BACKUP OF DATABASE SUMMARY;), each backup gets one line with these columns:
- Key: A unique key identifying the backup set
- TY: Type of backup (B for backup set, P for proxy copy)
- LV: For incremental backups, the incremental level (0 or 1); F for backup sets holding full data file backups; A for backup sets holding archived redo log files
- S: Status indicating availability (A), unavailability (U), or expiration (X)
- Device Type: The device the backup was written to, such as DISK or SBT_TAPE
- Completion Time: When the backup finished
The verbose output also shows the Size of each backup set and, in the LV column, NULL for non-incremental backups or 0 or 1 for incremental ones.
Common Use Cases
Database administrators use this command for several important tasks:
- Verifying that scheduled database backups completed successfully
- Planning restore operations by identifying available backup sets
- Auditing backup retention policies and identifying expired backups
- Troubleshooting backup issues by reviewing historical backup records
- Documenting backup coverage before performing major database changes
Related Commands
RMAN provides several variations of the LIST command for different purposes:
LIST BACKUP;- Shows all backups including database, archived logs, and control filesLIST BACKUP OF DATAFILE n;- Displays backups for a specific datafile numberLIST BACKUP OF TABLESPACE tablespace_name;- Shows backups for a specific tablespaceLIST BACKUP OF ARCHIVELOG ALL;- Lists all archived log backupsLIST BACKUP SUMMARY;- Provides a condensed summary view of all backups
Best Practices
When working with this command, database administrators should follow these guidelines:
- Run this command regularly to verify backup availability before performing maintenance
- Use the SUMMARY option (
LIST BACKUP OF DATABASE SUMMARY;) for quick status checks without detailed output - Combine with time filters like
COMPLETED AFTER 'SYSDATE-7'to focus on recent backups - Document backup keys from the output when planning specific restore operations
- Verify that backup status shows 'A' (available) for backups you plan to use for recovery
Insights
Unlike viewing backup files directly in the operating system, this command shows what the RMAN repository records. The two can differ. A backup piece deleted with an operating system utility still shows as available until a CROSSCHECK marks it expired. Backup pieces copied to a new location, or copies made outside RMAN, are not in the repository until you register them with the CATALOG command.
The command also helps identify backup coverage gaps that could impact recovery objectives. By reviewing the completion times and backup levels, administrators can ensure that full and incremental backup schedules align with business requirements for recovery point objectives (RPO) and recovery time objectives (RTO).
References
- RMAN List Command - Julian Dyke - RMAN LIST command syntax with examples for database, data file and tablespace backups
- RMAN List Command - Oracle Survival Diary - RMAN LIST options for backups, archived logs, copies and incarnations
- LIST - Oracle Database 23 Backup and Recovery Reference - Official syntax and output column definitions for the RMAN LIST command
- LIST - Oracle Database 19c Backup and Recovery Reference - 19c version of the LIST reference, including the SUMMARY output columns (Key, TY, LV, S)
- dbObject - Oracle Database 19c Backup and Recovery Reference - Definitions of the DATABASE, DATAFILE and TABLESPACE objects used after OF
- Reporting on RMAN Operations - Oracle Database 19c Backup and Recovery User's Guide - How LIST and REPORT use the RMAN repository, and verbose versus summary output
- Basic RMAN Commands - Expert Oracle - Introduction to fundamental RMAN commands for database administrators
Posts in this series
- How to Create Oracle RMAN Recovery Catalog Step by Step
- How to Register an Oracle Database with RMAN Catalog
- Oracle RMAN Unregister Database from Recovery Catalog
- Oracle RMAN Reset Database After RESETLOGS Recovery
- Oracle RMAN CROSSCHECK BACKUP Command Explained
- Oracle RMAN Resync Catalog Command Guide
- Oracle RMAN: Delete Backup Pieces with Manual Channel
- Oracle RMAN Database Backup Commands Guide
- Oracle RMAN Database Restore and Recovery Guide
- Delete Archive Log Older Than 5 Days in Oracle RMAN
- Oracle RMAN Crosscheck Archivelog - Fix RMAN-06059 Error
- Oracle RMAN List Backupset Command Guide
- Oracle RMAN List Backup of Database Command
- List Backup of Archivelog All: Oracle RMAN Command Guide
- Oracle RMAN Report Obsolete Command Guide
- Oracle RMAN Report Obsolete Redundancy Command Guide
- Oracle RMAN Delete Obsolete - Remove Unneeded Backups
- Oracle RMAN RESTORE DATABASE VALIDATE Backup Check
- Oracle RMAN REPORT SCHEMA Command: Display Database Files
- Oracle RMAN Delete Expired Backup: Repository Cleanup
- LIST BACKUPSET OF DATABASE: Oracle RMAN Command Guide
- Oracle RMAN Delete Obsolete Backups with Maintenance Channel
- Find Oracle Archive Logs Older Than N Days with find -mtime
- Audit RMAN Backup Job History with V$RMAN_BACKUP_JOB_DETAILS