Oracle RMAN List Backupset Command Guide
Oracle RMAN List Backupset Command Guide
Purpose
The list backupset; command in Oracle Recovery Manager (RMAN) displays detailed information about backup sets stored in the RMAN repository. This command helps database administrators view backup set metadata, including backup pieces, unique keys, completion times, and status information for recovery planning and backup verification.
Code
1list backupset;
Breakdown of the Command
The list backupset; command is a simple RMAN reporting command that requires no additional parameters. When executed at the RMAN prompt, it queries the RMAN metadata stored in either the control file or recovery catalog and displays all registered backup sets.
Basic Syntax
1RMAN> list backupset;
To list a specific backup set, you can provide the backup set key:
1RMAN> list backupset <key>;
For example:
1RMAN> list backupset 1234;
Key Points
- Displays backup sets only: The command shows backup sets, backup pieces, and proxy copies but does not display image copies
- Shows all backup types: Includes datafile backups, archived logs, control files, and SPFILE backups
- Unique identifiers: Each backup set has a unique key (BS Key) and each backup piece has its own identifier (BP Key)
- Status information: Displays each backup piece's status as AVAILABLE, UNAVAILABLE, or EXPIRED
- Default behavior: Lists both usable and unusable backups by default, including expired and unavailable backups (Oracle 10g Release 2 reference)
- Detailed output: Shows completion time, file locations (handles), tags, and System Change Numbers (SCNs)
Output Columns Explained
Backup Set Information
The list backupset output includes several important columns:
- BS Key: A unique key identifying the backup set in the RMAN repository
- Type: The backup type, either
FullorIncr(incremental); shown for datafile backup sets - LV: The backup level, blank for full (non-incremental) backups and 0 or 1 for incremental backups. The
F(full) andA(archived logs) codes appear only inlist backup summary;output - Device Type: Storage device (DISK or SBT_TAPE)
- Completion Time: When the backup finished
Backup Piece Information
For each backup set, the command displays information about backup pieces:
- BP Key: Unique identifier for each backup piece
- Status: Piece status (AVAILABLE/EXPIRED/UNAVAILABLE)
- Compressed: Whether compression was used (YES/NO)
- Tag: User-defined label assigned during backup creation
- Handle/Piece Name: Full file path or tape handle for the backup piece
Insights and Best Practices
When to Use This Command
Use list backupset when you need to:
- Verify backup existence: Confirm that backups completed successfully and are registered in RMAN
- Find backup keys: Identify the key number needed for restore or delete operations
- Check backup status: Determine if backups are available or have expired
- Audit backup history: Review backup details for compliance reporting
- Troubleshoot recovery: Locate specific backup pieces needed for database restore operations
Comparison with Related Commands
| Command | Purpose |
|---|---|
list backup; | Shows backup sets (with their backup pieces) and proxy copies |
list backupset; | Displays only backup sets, backup pieces, and proxy copies, excluding image copies |
list copy; | Shows datafile copies and archived redo log copies (image copies) |
list backup summary; | Provides one-line summary for each backup without detailed information |
list backup by file; | Organizes output by datafile, showing which backups contain each file |
Filtering and Advanced Usage
You can filter the output to show specific backup sets:
1-- List specific backup set by key
2RMAN> list backupset 44;
3
4-- List backup sets of a specific datafile
5RMAN> list backupset of datafile 1;
6
7-- List backup sets with a specific tag
8RMAN> list backup tag 'WEEKLY_BACKUP';
Understanding Backup Set Keys
The backup set key (BS Key) is a unique identifier that RMAN assigns to each backup set. If RMAN is connected to a recovery catalog, the BS Key is the primary key of the backup set in the catalog, and catalog keys differ from control file keys. Use this key when you need to act on a specific backup set with crosscheck, change, or delete, for example crosscheck backupset 1234;.
Default Output Behavior
In the Oracle 10g Release 2 syntax, list backupset defaults to the "BY BACKUP" format, which organizes output by backup sets first, then shows the contents of each backup set including pieces and files. VERBOSE output, a detailed description of each backup set, is the default unless you specify the SUMMARY keyword.
Practical Example
1RMAN> connect target /
2RMAN> list backupset;
Expected output format:
1List of Backup Sets
2===================
3
4BS Key Type LV Size Device Type Elapsed Time Completion Time
5------- ---- -- ---------- ----------- ------------ ---------------
61338 Full 500M DISK 00:05:23 14-FEB-26
7 BP Key: 1340 Status: AVAILABLE Compressed: NO Tag: TAG20260214T070000
8 Piece Name: /u01/backup/db_1338_20260214.bkp
References
- LIST - Oracle Database Backup and Recovery Reference (19c) - Output column definitions for backup sets and pieces (BS Key, Type, LV, Device Type, Status, Tag) and the LIST BACKUP, LIST COPY, and SUMMARY options
- LIST - Oracle Database Backup and Recovery Reference (10g Release 2) - The BACKUPSET option, its BY BACKUP and VERBOSE defaults, and the default listing of usable and unusable backups
- recordSpec - Oracle Database Backup and Recovery Reference (19c) - BACKUPSET primary-key syntax used by LIST, CHANGE, CROSSCHECK, and DELETE
- RMAN Command Examples Quick Reference - Oracle Help Center (26) - Oracle examples including
LIST BACKUPSET OF DATAFILE 1;andLIST BACKUP TAG 'ORCL_FULL'; - Recovery Manager (RMAN) - ORACLE-BASE - RMAN basics walkthrough, including LIST BACKUP and LIST INCARNATION in its lists and reports section
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