RMAN Configuration Demystified: A Practical Deep Dive for
DBAs – Part 2
RMAN > CONFIGURE
DEVICE TYPE DISK PARALLELISM 2; |
- RMAN
opens 2 channels to write to disk simultaneously.
- This
improves backup/restore speed, especially for large databases or
multiple datafiles.
- Each
channel can operate independently, writing to different backup pieces.
RMAN >CONFIGURE
DEVICE TYPE SBT PARALLELISM 2; |
·
RMAN will use 2 channels to send
backup data to tape drives in parallel.
·
This improves throughput (faster
backups/restores) especially when:
·
You have multiple tape drives.
·
Your tape infrastructure supports concurrent
streams.
RMAN >CONFIGURE
CHANNEL DEVICE TYPE DISK FORMAT '/backup/orabackup/ora_df%t_s%s_s%p'; |
·
Sets the backup file naming format for
disk backups.
·
%t represents four byte time stamp, %s with
the backup set number, and %p with the backup piece number.
RMAN >CONFIGURE
CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2G; |
·
RMAN Limits maximum size of a backup
piece to 2 GB.
RMAN >CONFIGURE
CHANNEL DEVICE TYPE DISK FORMAT ‘/tmp/%U’; |
·
Overrides previous disk format to /tmp/%U. (%U =
unique filename)
RMAN >CONFIGURE
CHANNEL DEVICE TYPE DISK FORMAT ‘/disk1/%U’, ‘/disk2/%U’; |
Defines where and how RMAN should name the backup files:
- %U
is a substitution variable that generates a unique file name.
- RMAN
will alternate writing backup pieces between /disk1/ and /disk2/ paths.
- This
provides load balancing across multiple directories/disks.
RMAN >CONFIGURE
DEVICE TYPE <DISK | SBT> BACKUP TYPE TO COMPRESSED BACKUPSET; |
This Configures RMAN to always create compressed backup
sets instead of regular backup sets or image copies.
RMAN >CONFIGURE
CONTROLFILE AUTOBACKUP ON; |
This is used to enable automatic backup of the control
file and the server parameter file (SPFILE) every time an RMAN backup is
run or a structural change is made to the database.
RMAN >CONFIGURE
CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
'/u01/orclbackup/ora_cf%F'; |
This sets a custom format for automatic control
file and SPFILE backups when the device type is DISK.
%F Combines the DBID, day, month, year, and sequence into a
unique and repeatable generated name
RMAN >CONFIGURE
CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+DATA/%F'; |
This is used to configure automatic control file and
SPFILE backups to be stored in an Oracle ASM disk group named +DATA
RMAN >CONFIGURE
BACKUP OPTIMIZATION ON; |
It enables backup optimization, which helps avoid
backing up files that haven't changed since the last backup.
With BACKUP OPTIMIZATION ON, RMAN will skip backing
up:
- Datafiles
that are:
- part
of a previous backup of the same file
- not
changed since that backup
- Archived
redo logs that were already backed up to the same device type
- Control
files and SPFILEs that are unchanged
RMAN >CONFIGURE
DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT TO 2; |
·
This command instructs RMAN to create 2
identical copies of each datafile backup when backing up to SBT (tape).
·
It will write 2 separate backup sets, each
containing the same datafiles.
·
This increases redundancy — useful for offsite +
onsite storage, or general fault tolerance.
RMAN >CONFIGURE
ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT TO 2; |
·
This tells RMAN to create 2 identical copies of
each archived redo log backup when backing up to SBT (tape).
·
It writes them as separate backup sets (not just
duplicated files in the same set)
RMAN >CONFIGURE
DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2; |
·
It configures RMAN to create 2 identical backup
copies of each datafile when backing up to disk.
·
Each copy is a complete, usable backup of the
datafile.
·
This provides redundancy in case one backup file
is lost or corrupted.
No comments:
Post a Comment