We can use the Oracle Data Pump technology for Oracle 10g, 11g, 12c, 18c and 19c databases.
First create an Oracle directory BACKUP_DIRECTORY that points to an operating system directory on the database server machine for reading and writing files.
Assume ORCL is the database server name or SID. **
**Sqlplus.exe / as sysdba CREATE OR REPLACE DIRECTORY BACKUP_DIRECTORY as '/backups/Oracle'; GRANT read, write ON DIRECTORY BACKUP_DIRECTORY TO MM;
Then use Oracle Data Pump (expdp
, impdp
) to backup and restore the
metadata repository.
Backup
To backup (export) the metadata repository database to a file MM.dmp
and write the export log to expdpMM.log
in the operating system
directory /backups/Oracle
: **
**expdp MM/MM123! schemas=MM directory=BACKUP_DIRECTORY dumpfile=MM.dmp logfile=expdpMM.log
Restore
Before you restore the backup to the repository database, you need to
drop the schema MM to delete existing objects and data from the
repository database. Restore will recreate the schema MM. **
**Sqlplus.exe SYS@ORCL as SYSDBA DROP USER MM CASCADE;
To restore (import) the metadata repository database from a file MM.dmp
and write the import log to impdpMM.log in the operating system
directory /backups/Oracle: **
**Impdp schemas=MM directory=BACKUP_DIRECTORY dumpfile=MM.dmp logfile=impdpMM.log
When prompted for Username, enter /
as sysdba
.
You may refer to the Oracle Data Pump documentation for more details on the expdp and impdp commands. Backup Restore using Recovery Manager (RMAN) You may also use Oracle Recovery Manager (RMAN) to backup and restore your repository database. It is a good practice to create a separate table space for the repository database and restore only from that table space. For more information refer to the Oracle Database Backup and Recovery User Guide.