Backing up the ARCHIVELOG database
Let us first place the database in the ARCHIVELOG
mode before backing up the database. We have already gone through the procedure of placing the database in the ARCHIVELOG
mode earlier in this chapter.
Switch a few log files after opening the database using ALTER SYSTEM SWITCH LOGFILE
and look for new archived redo log files in the C:\oraclexe\app\oracle\fast_recovery_area\XE\ARCHIVELOG\
folder.
Now our database is ready for the backup. Let us now take a manual backup instead of using the Oracle Database XE-supplied backup script. Log in to the RMAN session, connect to the target database, and run the backup command.
The following is the simple backup command that we will use to back up our database:
-- RMAN back command to backup database and archive logs RMAN> backup database plus archivelog;
Alternatively, you can specify the backup location using the FORMAT
clause. %U
generates unique filenames for the backup pieces as follows:
RMAN> backup database...