Have you ever encountered a situation where you accidentally deleted backup files from the catalog, or perhaps you want to manage data files copied via OS commands using RMAN? With Oracle Recovery Manager (RMAN), as long as the physical files are healthy, you can re-register their information into the control file or recovery catalog after the fact.
In this article, we will explain the procedures for re-registering backups in Oracle RMAN and how to catalog files obtained outside of RMAN in a way that is easy for beginner to intermediate Oracle engineers to understand.
- Conclusion: Shortest Registration Procedure (Checklist)
- Background and Basics: Why is “Cataloging” Necessary?
- Step 1: Re-registering Deleted RMAN Backups
- Step 2: Registering Files Copied Outside of RMAN
- Execution Example and Verification
- Troubleshooting: ORA Errors and Solutions
- Operational Notes and Pitfalls
- FAQ: Frequently Asked Questions
- Summary
Conclusion: Shortest Registration Procedure (Checklist)
The fastest steps to restore backup information to the catalog (control file) or to register new files are as follows:
- Verify physical files: Use
ls -lor similar commands to confirm the target files exist and that theoracleuser has read permissions. - Connect to RMAN: Connect to the target database using
rman target /. - Execute cataloging:
- Bulk registration by directory:
CATALOG START WITH '<directory_path>'; - Specific backup piece:
CATALOG BACKUPPIECE '<file_path>';
- Bulk registration by directory:
- Confirm registration: Verify if the information appears using
LIST BACKUP;orLIST COPY;.
Background and Basics: Why is “Cataloging” Necessary?
RMAN manages information such as backup locations and timestamps in the “control file” or a “recovery catalog (a dedicated database).”
- Files not in the catalog cannot be used: Even if a backup file exists on the OS, if it has been removed from RMAN’s management information, the
RESTOREcommand will not recognize it. - Role of the “CATALOG” command: This process scans external (or forgotten) physical files and writes their metadata into the RMAN repository.
Step 1: Re-registering Deleted RMAN Backups
This procedure re-registers backup pieces that were removed via the DELETE command or whose information expired due to retention policies.
1. Preparation (Common for CDB/PDB)
- Execution User:
oracle(OS) - Required Privileges:
SYSDBAorSYSBACKUP - Target: Oracle Database 19c (In multitenant configurations, connecting to
CDB$ROOTwith a common user is recommended)
2. Registering Backup Pieces Individually
To make RMAN recognize a specific backup piece, use the following command:
-- Specify a specific backup piece to register in the catalog
RMAN> CATALOG BACKUPPIECE '/home/oracle/backup/013hrp1s_1_1';
3. Bulk Registering Files in a Directory
If there are multiple files, you can search and register them using prefix matching of the path.
-- Search and register all valid files under the specified directory
RMAN> CATALOG START WITH '/home/oracle/backup/';
Note:
START WITHscans paths starting with the specified string. By including a trailing/, you can target the entire directory.
Step 2: Registering Files Copied Outside of RMAN
This method allows RMAN to recognize “user-managed backups”—data files copied using the OS cp command or storage features—as RMAN “image copies.”
1. Registering Data File Copies
-- Register an OS-copied data file as an RMAN image copy
RMAN> CATALOG DATAFILECOPY '/backup_location/system01.dbf';
2. Restoring Using the Registered File
Once registered, it can be handled just like a standard RMAN backup.
-- Example of restoring the registered copy to its original location
RMAN> RESTORE DATAFILE 1 FROM TAG <tag_assigned_at_registration>;
Execution Example and Verification
The following is a log of an actual file registration in the catalog.
-- 1. Check current status (the file does not appear in the list at this point)
RMAN> LIST BACKUP;
-- 2. Execute catalog registration
RMAN> CATALOG START WITH '/home/oracle/backup/013hrp1s_1_1';
-- Search results will be displayed; confirm with 'yes'
-- File Name: /home/oracle/backup/013hrp1s_1_1
-- Do you really want to catalogue the above files (enter YES or NO)? yes
-- 3. Check the list again
RMAN> LIST BACKUP;
Intent of the SQL: Scans unregistered physical files and updates the backup set information within the control file. This allows them to be automatically selected as candidates during restoration.
Troubleshooting: ORA Errors and Solutions
| Error Code | Cause | Action |
| ORA-19505 | File not found | Verify the physical path is correct and check OS permissions. |
| ORA-19809 | Fast Recovery Area (FRA) full | If cataloging causes the limit to be exceeded, expand FRA capacity or delete old files. |
| RMAN-06004 | Communication error with catalog DB | Execute RESYNC CATALOG; and verify synchronization with the recovery catalog. |
Operational Notes and Pitfalls
- Risks and Reversal: If you accidentally register an old (inconsistent) file, it may be selected during recovery, leading to failure. If incorrectly registered, you can remove only the registration using
CHANGE BACKUPPIECE '...' UNCATALOG;. - Security:
DBAprivileges are required to execute catalog commands. For encrypted backups with a backup password, the password is required for restoration even if registration is successful. - Password Caution: If the password used for the RMAN connection contains the
@symbol, it may be misinterpreted as part of the connection string. Use double quotes to enclose it.
FAQ: Frequently Asked Questions
Q1. I cataloged it, but it doesn’t appear in LIST BACKUP. A. It may have been recognized as an “image copy” rather than a “backup set.” Try the LIST COPY; command.
Q2. Can I check if the registered backup is corrupted? A. Yes. By executing VALIDATE BACKUPSET <key_number>;, you can check for physical corruption or block inconsistencies.
Q3. Is this effective even if I am not using a recovery catalog (external DB)? A. Yes. In that case, the information is written to the target database’s “control file.”
Summary
- Deleted backups can be easily restored using
CATALOG START WITH. - OS-copied files can be brought under RMAN management using the
CATALOGcommand. - After registration, always verify validity with
LIST BACKUPorVALIDATE. - In operations, use
CROSSCHECKin conjunction to maintain consistency between the catalog and physical files.
This article targets Oracle Database 19c (screens and default values may differ for other versions).
[reference]
Oracle Database Backup and Recovery Reference, 19c


コメント