LESSON 18
Backup,
Recovery and Flashback
How to
perform cold backup on CDB using RMAN
Assuming you database is in the
archivelog
mode
Your
backup location is
/recovery_area/mycdb/backupset
You
have "export
NLS_DATE_FORMAT="DD-MM-YYYY HH24:MI:SS""
in your profile
Run the
mycdb profile
# . ./.profile
Performing the whole CDB full backup
# rman target
/
RMAN> SHOW
ALL;
RMAN>
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN>
CONFIGURE CONTROLFILE AUTOBACKUP ON;
--You enter
any SQL commands such as changing the recovery area size
RMAN> ALTER
SYSTEM SET db_recovery_file_dest_size=200G;
--Full CDB
backup
RMAN>
BACKUP DATABASE PLUS ARCHIVELOG;
RMAN> LIST
BACKUP SUMMARY;
RMAN> exit;
Performing a whole PDB backup
# rman target
/
RMAN> SHOW
ALL;
RMAN>
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN>
CONFIGURE CONTROLFILE AUTOBACKUP ON;
--Full PDB
backup
RMAN>
BACKUP PLUGGABLE DATABASE mypdb1;
RMAN> LIST
BACKUP SUMMARY;
RMAN> exit;
Performing a PDB backup of the tablespace mytbs
# rman target
/
RMAN> SHOW
ALL;
RMAN>
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN>
CONFIGURE CONTROLFILE AUTOBACKUP ON;
-- A
tablespace backup
RMAN>
BACKUP TABLESPACE mypdb1:mytbs;
RMAN> LIST
BACKUP SUMMARY;
RMAN> exit;
Good
Luck!
|