Most production databases have 24/7 availability requirements. Therefore, you need to take online RMAN backups.
Your database must be in archivelog mode for online backups and to be able to recover to a point in time.
You need to consider carefully how to place archivelogs, how to format them, how often to back them up, and how long to retain them before deletion.
Set the Archivelog Destination and File Format Oracle writes the archivelogs to one or more of the following locations:
• Default location
• FRA
• Location specified via the LOG_ARCHIVE_DEST_N initialization parameters
If you do not use an FRA and if you do not explicitly set the archivelog destination via a LOG_ARCHIVE_DEST_N initialization parameter, then by default the archivelogs are written to an OS-dependent location with the format %t_%s_%r.dbf (%t is the timestamp, %s is the log sequence number, and %r is the log ID).
With FRA, by default the archivelogs are written to a directory in the FRA. The default filename format of the archivelog files created in the FRA is Oracle Managed File (OMF). It is better to set the parameters and choose a format:
log_archive_dest_1 = ‘LOCATION=/oraarch1/mmdb23c’ log_archive_format = ‘%t_%s_%r.arc’
The .arc extension avoids the potentially confusing task of identifying a file as an archivelog file or a live database data file.
Configure Channel Format
When writing to multiple disk locations, it is easier to specify the directories using CONFIGURE CHANNEL … FORMAT. Here is a typical configuration specifying the following:
RMAN> configure device type disk parallelism 3;
RMAN> configure channel 1 device type disk format ‘/u01/db23c/rman/rman1_%U.bk’;
RMAN> configure channel 2 device type disk format ‘/u02/db23c/rman/rman2_%U.bk’; RMAN> configure channel 3 device type disk format ‘/u03/db23c/rman/rman3_%U.bk’;
In these lines of code, you should configure the device-type parallelism degree to match the number of channels that you allocated.
RMAN allocates the number of channels as specified by the degree of parallelism; other configured channels are ignored.
For instance, if you specify a degree of parallelism of 2, RMAN allocates only two channels, regardless of the number of channels you configured via the CONFIGURE CHANNEL command.
In this example of configuring three channels, suppose the BACKUP command is issued, like this:
RMAN> backup database;
RMAN allocates three channels, all on separate mount points (/u01, /u02, /u03), and writes in parallel to the specified locations. RMAN creates as many backup pieces in the three locations as it deems necessary to create a backup of the database.
If after running the backup you need to unconfigure a channel, do so as follows:
RMAN> configure channel 3 device type disk clear;