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 and backup pieces 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 backup status as AVAILABLE, EXPIRED, or UNAVAILABLE
- Default behavior: Lists both usable and unusable backups by default, including expired backups
- 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 (Full, Incremental Level 0, Level 1, or Archive Log)
- LV: Backup level indicator where 0 = incremental level 0, 1 = incremental level 1, A = archive logs, F = full backup
- Status: Current status such as AVAILABLE, EXPIRED, or UNAVAILABLE
- 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 all backups including both backup sets and image copies |
list backupset; | Displays only backup sets and backup pieces, excluding 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 key is unique across all registered databases. This key is essential when you need to perform operations on specific backups, such as crosschecking, validating, or deleting.
Default Output Behavior
By default, list backupset uses the "BY BACKUP" format, which organizes output by backup sets first, then shows the contents of each backup set including pieces and files. The command displays verbose output with detailed descriptions 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
- How to List Backup in RMAN? - Vinchin Backup & Recovery - Comprehensive guide on using RMAN LIST BACKUP commands including list backupset syntax and examples
- RMAN List Command - Julian Dyke - Technical reference for RMAN LIST command variations and detailed syntax examples
- LIST - Oracle Documentation (10g) - Official Oracle documentation explaining LIST BACKUPSET command options and output format
- LIST Command Reference - Oracle Help Center - Detailed explanation of LIST command output columns and backup set metadata
- RMAN List Command - Oracle Survival Diary - Practical examples of RMAN list commands for backup management
- How to List Oracle RMAN Backup Pieces - Guide explaining backup pieces, BP Keys, and backup set structure
- RMAN List Backup Summary Command - Geodata Master - Explanation of backup level indicators and summary command output
- RMAN Command Examples Quick Reference - Oracle Help Center - Official Oracle quick reference for RMAN commands including LIST variations