Preplugin backups are backups taken of a non-CDB or a PDB before they are plugged into a target CDB. You can relocate the PDB by unplugging it from a source CDB or NON-CDB and plugging it into target CDB. RMAN can perform PDB restore and recovery operations on the target CDB by using preplugin backups. From 18c, RMAN now supports use of the PREPLUGIN for commands like CATALOG, CROSSCHECK, LIST, CHANGE etc. Here is a complete explanantion of preplugin PDB backup on source CDB and restore/recovery on target CDB after plugging in.

Source: CDB18 and PDB18 ( PDB Backup and unplug from source CDB)

Destination: CDB_dest and PDB18 ( plug-in to dest CDB and restore/recover test)

Creating Preplugin Backups of PDBs Using RMAN On source CDB:

Connect to the PDB as a local or common user with SYSDBA/SYSBACKUP privilege.

Unplug/Plugin PDB

The metadata that is required for these preplugin backups to be usable in a destination CDB is included in the XML file created when the PDB is unplugged from the source CDB. Unplug the source PDB as below.

Check compatibility of unplug database to target cdb.

Now plugin the unplugged PDB.

Complete recovery of a PDB using preplugin backups:

I removed the one of the datafile and now do the restore and recover operation from preplugin backups.

Note: Ensure that the shared location containing preplugin backups of the PDB is accessible to the destination host.

Connect as root or PDB that needs to be recovered by using as a user with the sysdba/ sysbackup permissions. I connected as root and set the PDB that need recovery.

View the preplugin backups with list commands.

Restore PDB with preplugin backup.

Recover PDB  using preplugin backups. I received error for missing last archive log.

I need to catalog into the new CDB any archivelog files generated after the last backup through the database unplug.  This is done with the new RMAN syntax, catalog preplugin archivelog.

Next step is to restore any datafiles that added to the PDB since plugin to new CDB.  In my case, there are none, so this step can be skipped.  But I ran to see the result.

Now run the normal recovery of the PDB. Open the recovered PDB and test the connection.


  • You cannot recover a PDB using preplugin backups if the preplugin backup was created before the PDB was opened with the RESETLOGS option.
  • Pre-plugin backups for Non-CDB can be done with full database backup including archive logs.

Thanks for reading this blog and I hope, it’s useful for you.


1 Comment

  1. Thanks for the posting the complete recovery of PDB using Preplugin Backups. This is really helpful.

Leave a Reply