This document details the RMAN backup procedure for Oracle Database, outlining methods for both offline (consistent) and online (inconsistent) backups.
- Consistent Backup (Offline): Requires database downtime. The database must be shut down cleanly, causing application outage. Not ideal for production environments due to downtime.
- Inconsistent Backup (Online): Performed while the database remains online and accessible. Requires the database to operate in ARCHIVELOG mode to preserve transactional integrity.
To ensure uninterrupted database operation, the online backup method is selected. This backup method allows transactions and database access to continue seamlessly during backup.
-
The database must be running in ARCHIVELOG mode.
-
Verify ARCHIVELOG mode using the command:
sqlplus / as sysdba ARCHIVE LOG LIST;
Status: Verified that the database is already in ARCHIVELOG mode.
Set RMAN to automatically back up control files for safety and ease of recovery:
rman target /
CONFIGURE CONTROLFILE AUTOBACKUP ON;Backups will be stored on a dedicated drive:
- Drive:
F: - Directory:
F:\rman_backup - Available Space: 184 GB (adequate for the current database size)
Execute the following RMAN commands to perform the backup on a single processor:
RUN {
ALLOCATE CHANNEL c1 DEVICE TYPE DISK FORMAT 'F:\rman_backup\backup_%U.bkp';
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
RELEASE CHANNEL c1;
}- Note: This is a CPU bound operation (4.2.5), its a best practise to do this operation during non-peak business hours.
- https://docs.oracle.com/cd/B19306_01/backup.102/b14192/bkup002.htm
Given that the server has multiple logical processors (e.g., 4 logical processors), we will allocate parallel RMAN backup channels to optimize performance. To maintain a balance between backup efficiency and ongoing database operations, approximately 50% of available processing capacity will be dedicated to backup tasks. This balanced approach ensures minimal impact on live database performance while significantly speeding up the backup operation.
RUN {
ALLOCATE CHANNEL c1 DEVICE TYPE DISK FORMAT 'F:\rman_backup\backup_%U.bkp';
ALLOCATE CHANNEL c2 DEVICE TYPE DISK FORMAT 'F:\rman_backup\backup_%U.bkp';
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
RELEASE CHANNEL c1;
RELEASE CHANNEL c2;
}- ALLOCATE CHANNEL: Specifies backup destination and file naming.
- COMPRESSED BACKUPSET: Optimizes storage usage.
- PLUS ARCHIVELOG: Ensures transaction logs are included, allowing complete database restoration.
- Creates multiple backup pieces ensuring a complete, recoverable database state.
- Database remains online and fully operational during the backup.
To verify successful completion, use:
LIST BACKUP OF DATABASE COMPLETED BETWEEN 'SYSDATE-1' AND 'SYSDATE';This will list backup sets and pieces, confirming backup integrity and completeness.