Restoring backed up data oracle 19c
Restoring backed up data oracle 19c
- Shutdown the Database:
RMAN> shutdown immediate;
This command shuts down the Oracle database immediately.
Start the Database in NOMOUNT Mode:
RMAN> startup nomount;
This command starts the Oracle instance without mounting the database.
Restore the Controlfile:
RMAN> restore controlfile from '/backup/controlfile/auto/cf_c-635058513–20230516–0c.rman';
Here, you are restoring the control file from the specified backup location.
Mount the Database:
RMAN> alter database mount;
This command mounts the restored database.
Catalog Backup Files:
RMAN> catalog start with '/backup/cbs1pdbs';
This command catalogs backup files from the specified directory. Cataloging makes RMAN aware of the backup sets and image copies that exist in the directory.
Restore the Database:
RMAN> restore database;
This command restores the entire database from the backups.
Recover the Database:
RMAN> recover database;
This command performs the recovery of the restored database using redo logs and archived logs if necessary. It ensures that the database is consistent up to the point of failure or to the desired point in time.

Open the Database with RESETLOGS:
RMAN> alter database open resetlogs;
Finally, this command opens the database with a reset of the redo log sequence. This is required after recovery to generate a new incarnation of the database.
Remember to replace the directory paths and filenames with the actual paths and filenames that correspond to your backup and controlfile locations. Always ensure that you have a valid and consistent backup before performing these operations to avoid data loss.
← PostgreSQL Blog