Oracle : RMAN Introduction

 


                                                     Oracle: RMAN Introduction

   


         Recovery Manager (RMAN) is an Oracle utility that you use to manage the backup, restore, and recovery operations on Oracle database. RMAN has a powerful command language that is independent of the operating system.

    Recovery Manager has a command-line interface. Oracle Enterprise Manager (OEM) also provides a graphical user interface for the Recovery Manager. Recovery Manager can be used on databases of Oracle8 or later releases.


RMAN Architecture


    There are key entities for RMAN to start with, some of them are mandatory and other are optional.


Mandatory

  • Target Database
  • Target Controlfile
  • RMAN Channels
Optional

  • Recovery Catalog
  • Oracle Secure Backup
  • Media Management Library
  • Auxiliary Database
  • Cloud Control 12c
Let's discuss this entities one by one::



Target Database
  • This is database for which RMAN is supposed to perform all the tasks of backup and if needed recovery as well.
  • The database to which RMAN would be connected and working for is the target database.
Target Controlfile
  • By default RMAN maintains its entire backup history or metadata in controlfile of target database. Duration is controlled by parameter control_file_record_keep_time in parameter file (Default is 7 days)

RMAN Channels
  • Communication interface between target database and auxiliary database
  • By keeping multiple channels, it gives benefit like parallelism and load balancing
  • A server session is allocated in target database for the channel
Auxiliary Database
  • Database which is used when doing tasks such as creating a duplicate database , doing taplespace point in time recovery (TSPITR) and database conversion to different platform or creating standby database, RMAN requires connection to this database which is getting executed
Recovery Catalog
  • As we know backup information is stored in target controlfile, but it will impact the storage space consumption of disk, to tide over this shortcoming; there is optional metadata storage that can be configured, called Recovery Catalog
  • Recovery Catalog is actually schema that we have to create it and then within it configure recovery catalog
  • This stores all the information related to backup and recovery.
  • This is can be configured on same target database but this is not recommended as any incident with target database can be dangerous to loose this information as well.
  • Can be stored information of multiple databases.
  • RMAN first stores information in target controlfile and then transfers it to recovery catalog.

RMAN Client
  • This is executable file that gets invoked by DBA. Using this we issues the statement which are executed within target database.
12c Cloud Control
  • This is latest offering in family of Enterprise Manager (EM), This is optional in RMAN, but it is still worth being used
Media Management Library (MML)
  • In order to take backup on tapes instead of disk, RMAN needs to interact with underlying tapes location and for that it requires drivers related to that tape driver, provided its manufacturer
  • MML is API that oracle provides to its vendors who write an interface between API and their products
Oracle Secure Backup
  • This is add on feature for RMAN
  • Oracle Secure Backup contains an in built MML for RMAN and offers a unified management interface for not just the database but also the underlying mount points
Memory requirements for RMAN
  • RMAN uses shared pool memory structure by default in order to keep metadata within instance before taking it to target controlfile.
  • Specifically talking, large pool (defined by LARGE_POOL_SIZE) is configured for RMAN activities, it will minimize the burden on shared pool as it is already occupied of large number of pools.
RMAN Backup Formats

There are two formats of backup supported in RMAN
  1. Backup Set
  2. Image Copy
Backup Sets
  • Backup set is logical structure, contains physical RMAN-specified file, which is considered as real backup of its source files i.e. datafile.
  • We can also say that metadata related to the physical RMAN-specified backup is contained within a backup set
  • By default RMAN perform backup in backup set format only
  • There are number of files generated during backup, each file is called backup piece
  • We can say backup piece is actual physical file, so in order to control its size we can use MAXPIECESIZE option during backup.
Image Copy
  • This is similar to normal copy that we take using OS copy command with benefit that it will be logged in controlfile and managed by RMAN
  • The difference between image copy and backup sets is that image copy backup will always contain all the blocks within file whether they are used or not.
Types of RMAN Backup

There are mainly two types of RMAN backup
  1. Full Backup
  2. Incremental Backup
    1. Cumulative Incremental Backup
    2. Differential Incremental Backup




Full Backup
  • This is entire database backup, can be done at mount stage or open stage
  • This backup includes datafiles, controlfiles and binary parameter file (spfile)
  • RMAN uses only used blocks to be included in this backup
  • For huge databases, it consumes large amount of storage, time and resources, so to avoid this we have incremental backups
Incremental Backup
  • This type of backup is used to minimize time, resource and storage space, it will be secure backup of blocks those are modified since last backup done
  • Its important to remember that a full database backup is not considered as valid level incremental backup
There are two levels used for incremental backups
  • Level 0 (base level backup)
  • Level 1 (incremental level backup)
Level 0
  • Signifies parent backup in an incremental backup strategy and consider it as base of all subsequent incremental backups.
  • This includes all blocks of source file in backup file at the time of backup being done
Level 1
  • This type of backup is child of level 0 backup and would contain only blocks which are modified since last level 0 backup.
Types of Level 1 Backups
  1. Differential 
  2. Cumulative 
Differential Incremental Backup
  • The main motive behind incremental backup is to save time, and it true for this differential backup as well
  • This backup contains all the changed blocks from either level 0 or level 1
  • Suppose we are taken level 0 backup on Sunday and we are taking differential incremental backup on subsequent days i.e. Monday to Saturday
  • Some cons with differential backup is that, as there will large number of backups, it would take long time to to finish restore and recovery
Cumulative Incremental Backup
  • Cumulative backups includes all the modified blocks since the last backup level 0 from the current level 1
  • Storage occupied will be larger than differential backup but number of backup copies will be less so will be the restore and recovery time
Incremental backups are fast but we can make them faster using couple of ways
  • Block change tracking  (10g and above)
  • Multi-Section incremental Backup (12c)




Comments

Popular posts from this blog

Oracle Database Server Architecture: Overview

Oracle E-Business Suite (EBS) - Introduction

Why enterprises must not ignore Azure DevOps Server