cohesity and oracle rman guide · cohesity and oracle rman overview & benefits application...

22
Cohesity and Oracle RMAN Guide

Upload: lyhanh

Post on 26-Jul-2018

787 views

Category:

Documents


55 download

TRANSCRIPT

Page 1: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

Cohesity and Oracle RMAN Guide

Page 2: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

1.

This white paper outlines the best practices for Oracle Recovery Manager with Cohesity Data Platform.

Table of Contents

About This Guide...................................................................................................................................2

Intended Audience................................................................................................................................2

Cohesity and Oracle RMAN Overview & Benefits..........................................................................3

Cohesity Cluster Management Interfaces: Dashboard, Alerts, SNMP,and User Management.........................................................................................................................5

Cohesity Protection Source................................................................................................................7

Cohesity Protection Policies...............................................................................................................7

Cohesity Protection Jobs....................................................................................................................8

Cohesity View Boxes............................................................................................................................8

Oracle Recovery Manager Overview.................................................................................................9

Fast Recovery Area Overview........................................................................................................9

Integration Options for Oracle RMAN..............................................................................................10

Cohesity and Oracle RMAN Configurations....................................................................................12

Creating a Cohesity Data Protection Job Using Remote Adapter...................................13

Creating a NFS Export on the Cohesity Storage Platform.................................................14

Cohesity Data Platform as a target for Oracle Database Server......................................14

NFS Settings ........................................................................................................................................14

RMAN Protection Jobs.....................................................................................................................15

Types of RMAN Backups..................................................................................................................15

Cohesity and Oracle RMAN Recommended Best Practices...............................................16

Degrees of Parallelism......................................................................................................................16

RMAN MAXOPENFILES and FILESPERSET..............................................................................16

RMAN and COhesity Source-side Deduplication...................................................................17

Set the Appropriate QoS Policy on Cohesity View for RMAN..........................................17

Summary.................................................................................................................................................18

About the Author..................................................................................................................................18

Version History......................................................................................................................................18

Appendix A............................................................................................................................................18

Example of Full RMAN backup script........................................................................................18

Example of Incremental RMAN backup script........................................................................18

RMAN restore and recovery script..............................................................................................19

RMAN Image Copy Script...............................................................................................................20

Sample SQL Queries for Managing and Monitoring RMAN...............................................20

©2018 Cohesity, All Rights Reserved

Page 3: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

About This GuideThis paper details the steps and best practices for protecting Oracle Databases using Oracle Recovery Manager (RMAN). In this guide, IT administrators or Database administrators are defined as individuals who have the role of managing storage and data protection of databases in a data center.

Intended AudienceThis paper is written for IT and Database administrators familiar with data protection of Oracle Databases.

This guide assumes moderate knowledge of Oracle Databases storage, backup and recovery technologies as well as fundamental understanding of Oracle RMAN in either physical or virtual environment. Cohesity recommends having familiarity with the following:

• Cohesity DataPlatform• Getting Started with RMAN

2.©2018 Cohesity, All Rights Reserved

Page 4: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

3.©2018 Cohesity, All Rights Reserved

Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large numbers of databases with data volumes ballooning due to growth in database size as well as compliance & regulatory mandates requiring older snapshots to be retained for longer periods of time. It is prohibitively expensive and risks data loss to retain this data on production storage. At the same time, having an effective data protection strategy with fast RTOs and RPOs is paramount, especially for mission-critical applications that can withstand only minimal downtime windows. Cohesity’s hyperconverged secondary storage platform provides a simple, fast, and cost-effective backup and recovery solution for growing Oracle database environments. Cohesity natively integrates with Oracle Recovery Manager (RMAN) to provide application-consistent backup and recovery for both Oracle single instance or Real Application Clusters (RAC). Challenges with Traditional Backup Software and Target Storage for Oracle Databases

• Application performance impact when running disruptive backup agents on production database servers• Expensive use of primary storage as scratch space for temporary

backups before it gets transferred to secondary storage• Complex data protection environments including media servers, master servers, agents, and target storage• Difficult to scale backup software and target storage to accommodate growing data• Long RTOs which can lead to revenue and productivity losses• Long RPOs, as backups are typically taken on a daily basis due to overhead on production servers• Inability to leverage public cloud for long-term retention

Cohesity provides a hyper-converged, end-to-end data protection solution that replaces and simplifies traditional backup and recovery solutions. The Cohesity solution provides:

• Distributed web-scale platform designed for secondary data: Performance and capacity can be scaled linearly by simply adding nodes - eliminating the need for forklift upgrades. The system provides ‘always-on availability’

• Simple data protection: Replace multiple data protection silos (target storage, media servers, master servers, and cloud gateways) with a single hyper-converged solution for backup, recovery, replication, cloud tiering, archiving, and target storage.

• Fast RPOs and RTOs• Oracle integrations for app-consistent backups• Global space efficiency due to Cohesity’s global variable-length dedupe

supporting both inline and post process dedupe and compression• Native cloud integration with Amazon Web Services (AWS), Google Cloud Platform, and

Microsoft Azure in support for long term retention and tiering of cold data

Cohesity secondary storage platform, when used in conjunction with Oracle RMAN, delivers unparalleled performance, and scale-out capabilities.

Simple data protection Customers can continue to backup the database using existing scripts resulting minimal change to the environments.

Simplify backup environments by eliminating the need for media servers, and master servers.

Application Consistent Protection RMAN performs application consistent backups to ensure the database can recover faster and have no data corruptions.

Distributed platform Scale out capacity and linear performance by simply adding nodes to the cluster.

Eliminate the need for forklift upgrades and data migrations.

Native cloud integration Integrate with AWS, Google Cloud, and Microsoft Azure for long term archival and data tiering.

Copy data management Ability to spin up clone database copies from backups to run test and dev environments. Cohesity Secondary Storage platform acts as NFS target for Oracle datafiles, control files, and redo logs.

Lower TCO Hyper-Converged solution which consolidates backup software licenses, media, and catalog servers, and backup targets.

Global deduplication, compression, and snapshots dramatically reduce physical storage usage.

Pay-as-you-grow expandability which reduces the need to over-provision.

Page 5: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

4.©2018 Cohesity, All Rights Reserved

Cohesity and Oracle RMAN Architecture and ConceptsThe core components of the Cohesity and Oracle RMAN solution are:

• Physical or virtual Oracle instance• Cohesity DataPlatform cluster• Optional remote disaster recovery Cohesity cluster• Optional archive or tiering target at your data center or Cloud provider of choice

Figure 1: Cohesity and Oracle RMAN Architecture Overview

As can be seen in the overview diagram above, Cohesity DataPlatform can easily be integrated into a new or existing Oracle infrastructure in minutes by simply adding the nodes, connecting the network, configuring a cluster partition with VIPs and installing the appropriate RMAN scripts, protection policies, jobs, and replication schedules.

NOTE: Oracle Database FRA or Flash Recovery Area is not recommended where Cohesity DataPlatform is the target destination.

Page 6: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

5.©2018 Cohesity, All Rights Reserved

Cohesity Cluster Management Interfaces: Dashboard, Alerts, SNMP, and User ManagementCohesity’s policy-based storage management approach is immediately viewable. Upon supplying credentials to the unified management web console hosted on DataPlatform, users are presented with an overall health dashboard of the cluster:

Figure 1: Cohesity and Oracle RMAN Architecture Overview

Figure 3: Default Administrative Roles

This dashboard reflects the overall health and state of the cluster including the number of jobs that have run, any SLA violations, errors or alerts as well as a brief data reduction and performance summary. Each of these items can be clicked on to review further detail. Storage, backup and virtualization administrators may utilize the dashboard for cluster status reviews, however the platform also provides built-in alerting mechanisms as well as SNMP support for notification of certain conditions. Role-based access control is available to allow granular administration of the Cohesity cluster. As of Cohesity OS v3.7, default or custom roles can be assigned to local users and groups or integrated with Windows Active Directory domain users and groups. Users can leverage Cohesity role-based access control to perform the following tasks:

• The ability to map users to Cohesity roles and provide segregation of duty within the UI• Create custom roles to fit your organization’s needs• The ability to restrict a user’s access to a set of objects like VMs, Physical

Servers, or Oracle databases within the organization

Page 7: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

6.©2018 Cohesity, All Rights Reserved

Figure 4: Customer Role Definitions

Figure 5: SNMP Configuration and MIB download

Figure 6: Cohesity REST API Reference

Cohesity’s SNMP support is enabled via the cluster management UI and the MIB can be downloaded directly from the cluster.

Finally, all cluster management tasks can be driven via the native REST API. Full monitoring and administration capabilities are available via the REST API with full API reference documentation.

Page 8: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

7.©2018 Cohesity, All Rights Reserved

Cohesity Protection SourcesProtection sources are workloads that are protected by Cohesity DataPlatform. Supported registered source are vCenter instances, ESX/ESXi hosts, physical servers, databases, storage arrays, and NAS appliances. Registration of a protection source is as simple as entering the hostname or IP address and the appropriate credentials.

Cohesity Protection PoliciesProtection policies describe backup frequency, backup retention, replication policies and archive schedules. Once policies are defined they can be applied to projection jobs thus ensuring appropriate protection strategies across the environment.

Figure 7: Cohesity Protection Policy and Extended Retention Rules

Protection policies are very flexible and provide a number of extended rules and monitoring options for:• Extended Retention: These rules extend the standard snapshot frequency and retention rules by

retaining selected snapshots for a longer period of time. In the example above, the standard rules call for snapshots every two hours with seven days retention. The first extended retention rule unsure that a daily snapshot from the standard rule is retained for an additional 30 days. Note the that this rule does create a new snapshot as extended retention rules use the first snapshot from the standard rule set

• Schedule End Date: A policy can be retired on a given date• Custom Retry Settings: Job retry settings inter and a number of attempts• Blackout Periods: Periodic pause settings in the associated job runs that use the policy• Alerts and SLAs: Alert mechanism for IT administrators of job success,

failures, or SLA violations on SLA limit settings

Policies are usually created to ensure RPO compliance and are made available to job protection across the entire cluster. Define policies based around data protection requirements that can be shared across protection jobs. Implement a naming scheme that allows easy identification of policy attributes.

Page 9: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

8.©2018 Cohesity, All Rights Reserved

Cohesity Protection JobsProtection jobs define one or more groupings of VMs for protection that comply with a specific Protection Policy (see above). Jobs also set the time and timezone of the job as well as the desired viewbox that will contain the protected data.

Jobs are primary used to assign policies to groups of VMs that have similar attributes. Most commonly, jobs are used to group VMs that have a common SLA and assigned a common protection policy. Jobs can also be used to capture VMs that serve the same application as a group. In other instances, jobs are used to capture VMs from logical groupings such as orga-nizational user groups, departments or geographical locations. Jobs protect VMs in one vCenter, thus VMs that span multiple vCenters will require multiple jobs. When doing so, it is best to use a naming convention that allows quick identification of related jobs.

Cohesity View BoxesView boxes represent storage efficiency domains within the Cohesity cluster and can optionally associate a view box with a specific cloud tier. When view boxes are created, the administrator assigns deduplication, compression and encryption attributes to the view box.

Figure 8: View Box Configuration

Figure 9: Cohesity View QoS Policy Settings

View boxes can be set for inline, post-process dedupe or no dedupe as well as inline post-process or no compression. These settings can be modified at creation and over the life of the view box. Encryption is enabled at creation and is only chosen at creation. Similarly, the Cloud Tier option is only available at creation time.

Cohesity ViewCohesity views represent mount points into a specific view box. Views provide NFS or SMB/CIFS protocol access for files, snapshots, and clones of other views. QoS can be set for each view that can tune performance for the target workload.

Page 10: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

9.©2018 Cohesity, All Rights Reserved

Oracle Recovery Manager OverviewOracle Recovery Manager (RMAN) is provided as the default Oracle utility and is the key component that drives all aspects of highly available and disaster-tolerant Oracle databases. RMAN ensures application consistent database backup, restore and recovery of both single-instance and RAC Oracle databases and provides block-level corruption detection during its operations.

RMAN also optimizes performance and space consumption during backup with file multiplexing and backup set compression. It integrates with Oracle Secure Backup, as well as third party backup applications (i.e. Commvault, Veritas, etc.)

RMAN also takes care of all underlying database procedures before and after backup or restore, freeing dependencies on operating system and SQL*Plus scripts. It also provides a common interface, via command line and Enterprise Manager, for backup tasks across different host operating systems and offers features not available through user-managed methods, such as parallelization of backup/restore data streams, backup files retention policy, and detailed history of all backups.

Recovery Manager is a client/server application that uses database server sessions to perform backup and recovery. It stores metadata about its operations in the control file of the target database and optionally, in a recovery catalog schema in an Oracle database.

Recovery Manager can automatically backs up to the Fast Recovery Area or FRA if there was no backup destination specified in the Recovery Manager backup. Cohesity does not recommend the use of Cohesity views as a target destination for Fast Recovery Area or FRA. Cohesity does not support this use case. As an alternative, you can use RMAN to backup to Cohesity as a disk target. With RMAN you can do full, incremental, or image copy of the database.

If Fast Recovery Area or FRA is a requirement you can use Cohesity as a secondary target for the Fast Recovery Area or FRA, where Cohesity is used as a SBT or disk target for a second copy for the Fast Recovery Area.

Fast Recovery Area OverviewThe Fast Recovery Area or FRA stores some of the production datasets (control files, flash logs, redo logs, archive log) we do not want these files stored on Cohesity as they can impact the performance of an Oracle Database.

In addition flash logs are used to flashback a transaction, table or the database to a point in time.

Fast recovery area can contain the following:

• Control files: During database creation, a copy of the control file is created in the flash recovery area• Online Redo Logs: Online redo logs can be kept in FRA• Archived log files: During the configurations of the FRA, the LOG_ARCHIVE_DEST_10 parameter in init.

ora file is automatically set to the flash recovery area location. Archived log files are created by ARCn processes in the flash recovery area location and the location defined by LOG_ARCHIVE_DEST_n

• Flashback logs: Flashback logs are kept in the flash recovery area when flashback database is enabled• Control file and SPFILE backups: The flash recovery area also keeps the control

file and SPFILE backups, which is automatically generated by Recovery Manager (RMAN) only if RMAN has been configured for control file autobackup

• Datafile copies: The flash recovery area also keeps the datafile copies• RMAN backup sets: RMAN backups can be stored in the FRA or can be written to disk

Page 11: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

10.©2018 Cohesity, All Rights Reserved

Integration Options for Oracle RMANCohesity provides two powerful integration options that meet the data protection needs of enterprise Oracle environments.

Option One: Oracle RMAN and Cohesity Remote Adapter (with NFS) Cohesity Remote Adapter delivers an integrated and centralized approach to manage Oracle backup jobs. It provides a single location to register and schedule all RMAN scripts across the Oracle environment. The Cohesity Remote Adapter is built-into Cohesity DataPlatform and provides flexible management of scripts running on remote hosts. This allows the Cohesity cluster to manage data protection processes and schedules as well as provide a consolidated log of all activity.

Oracle RMAN scripts are still hosted on the Oracle server with one extra step to register the scripts with the Cohesity cluster. Once registered, the RMAN scripts are remotely triggered and monitored for completion and activity is logged on the cluster.

Advantages of the Cohesity Remote Adapter:• Simplifies administration by providing a single-pane of glass to manage backups

and reports including blackout windows, pause for maintenance etc.• Provides a single location for the customer to register all RMAN scripts• Provides central scheduling for all RMAN scripts consolidating data

protection scheduling across multiple Oracle servers• Report and track all backup tasks, schedules, and alerts from a single console• QoS policy for workload optimization

Cohesity Cluster Linux Machine

MyBackupScript

DevViewBox

Policy

BackupSchedule*Capture Daily

ReplicationSchedule*Copy Weekly*Target EngReserve

Remote AdapterProtection Job Invoke

RMAN

RMA

N

Request

OracleDatabaseBackup

Script

BackupResult

MyBackupView NF

S Mo

unt Po

int

= NEW

Figure 11: Cohesity Oracle RMAN Target Diagram

Option Two: RMAN writing to Cohesity DataPlatform as NFS TargetFor this option, Cohesity is presented as a NFS target, enabling direct mount from Oracle database servers. No intermediate media servers are required. RMAN automatically leverages Cohesity’s QoS policy for optimal data tiering as well as global deduplication and compression to reduce secondary storage consumption and footprint.

Advantages of leveraging RMAN with Cohesity as an NFS target storage:• Minor change to the script needed by DBA’s • Leverage Cohesity hyper converged scale-out platform by adding more nodes as ingest demand increased.• QoS Policy for workload optimization

Page 12: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

11.©2018 Cohesity, All Rights Reserved

Cohesity Oracle Source Side Deduplication PluginThe Cohesity source-side deduplication plugin is supported for both options and provides storage efficient deduplication that enhances the environment with faster backups and reduced network traffic between Oracle servers and the Cohesity DataPlatform. Enabling this functionality shifts the deduplication processes to the Oracle server thereby reducing CPU consumption on the Cohesity platform allowing even further scaling to support more workloads. Additionally, Cohesity’s source-side deduplication plugin integrates with DataPlatform’s built-in deduplication to minimize data traffic by only moving new data blocks.

Advantages of the source-side deduplication plugin:• Faster backups• Reduce network traffic between Oracle servers and Cohesity DataPlatform• Enables more frequent backups resulting in higher RPOs• Offloading deduplication to the source client reduces CPU consumption on the Cohesity

DataPlatform which allows the Cohesity DataPlatform to run more backup workload sessions.

Figure 12: Cohesity Oracle RMAN with NFS

Figure 13: Cohesity Oracle RMAN with Source Side Dedupe

Page 13: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

12.©2018 Cohesity, All Rights Reserved

Cohesity and Oracle RMAN ConfigurationsThe configuration for the Oracle RMAN backup will depend on what options the database administrator and/or backup administrator decides to implement.

Oracle RMAN Remote Adapter• Create a Cohesity data protection job using the Cohesity Remote Adapter• Mount the Cohesity Views ‘NFS Mount Path’ on Oracle Database Server• Set QoS Policy for RMAN job• Run RMAN protection job

RMAN writing to Cohesity DataPlatform as an NFS target• Create NFS export on the Cohesity DataPlatform• Mount the Cohesity Views ‘NFS Mount Path’ on Oracle Database Server• Set QoS Policy for RMAN job• Run RMAN protection job

Creating a Cohesity Data Protection Job using Remote AdapterThis task creates a RMAN data protection job leveraging a pre-existing RMAN script. Start by navigating to the “Protection Job” landing page through the “Protection” menu option and then click “Create Job”. Then choose “Remote Adapter” as the job type. This will start the protection job setup workflow with each step of the workflow identified at the top of the screen.

From this page, either select “New Policy” to create a new policy or select an existing “Protection Policy”. With existing policy, you can ignore the default “Protection Schedule and Options” as this schedule does not apply for Oracle backups.

In the next “Specify Script Settings” page, Oracle database host information, SSH keys, and script locations need to be specified. Ensure the SSH key has been verified to allow remote login and execution of scripts. This can be verified by running a test script that just echo an output. Further details on this step can be found in the Cohesity document under the section “Creating a NFS Export on the Cohesity storage platform”.

Next specify a descriptive job name and specify the appropriate Cohesity View Box and Cohesity View.

As for the final step, a summary window is presented for review to make sure all the settings are correct.

Figure 14: Remote Adapter Job Summary

Page 14: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

13.©2018 Cohesity, All Rights Reserved

Creating a NFS Export on the Cohesity Storage PlatformIn order to create an NFS Export from the Cohesity DataPlatform, a “View Box” storage container must be created that allows for policy settings on the exported shares. Data management policies are set, such as enabling data reduction functionality, the type of data deduplication, whether inline or post process. A filesystem within the “View Box” must be created which is called a “View”. The “View” is associated with the View Box, which inherits the policies from the “View Box”. In the final configuration, access is granted to the Oracle database server by adding the Oracle Database server’s IP address in the “whitelist” that grants access to the shares.

Figure 15: Cohesity View Box

Figure 16: Create View in View Box example

Figure 17: Whitelist Settings

To create a “View”, navigate to the newly created “View Box” in this example, “Oracle-01” and select the icon with the description “Create View in View Box”.

In the “New View” page, enter the “View Name”, which is used to also create the exported share name. In the “Advanced Settings”, a specific protocol can be selected, in this example NFS is the protocol choice for Linux and Unix, for Windows, select the SMB protocol.

Finally, whitelist the IP subnet of the Oracle database server. Add the IP address or IP subnet of the Oracle database servers that are allowed to access exported NFS share in the Cohesity View.

Page 15: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

14.©2018 Cohesity, All Rights Reserved

Cohesity Data Platform as a target for Oracle Database ServerThis section describes how to configure the Oracle Database server to access the Cohesity Data Platform as a target for the RMAN backups.

Obtaining VIPs and Mount Path Information on Cohesity Data PlatformFrom the Cohesity UI navigate to the partition information page, select “Admin” > “Cluster Setup” > “Partitions” > “DefaultPartition”.

Figure 18: Hostname and VIPs

Figure 19: Cohesity View with NFS Export Share Name

To obtain the exported NFS share path information, from the Cohesity UI, navigate to “Platform” > “Views” and select the Oracle View. In our example, Oracle-01 “View” was created.

NFS SettingsFrom the Oracle Database server with a root privilege, create directories for use as mount points. Create the same amount of directories as the number of VIP addresses on the Cohesity Data Platform. In our example, we have four VIP addresses, thus we need to create four directories that will be used to mount the four configured VIPs on the Cohesity Data Platform.

Example:mkdir -p /mnt/oracle01mkdir -p /mnt/oracle02mkdir -p /mnt/oracle03mkdir -p /mnt/oracle04The following Linux NFS settings are the recommended options for the Cohesity Data Platform as they provide the best performance:noatime,vers=3,proto=tcp,rsize=1048576,wsize=1048576,hard,intr,nolock

Example:#mount -t nfs -o noatime,vers=3,proto=tcp,rsize=1048576,wsize=1048576,hard,intr,nolock <CohesityIPOne>:/Oracle-01/oracle-01/fs /mnt/oracle01#mount -t nfs -o noatime,vers=3,proto=tcp,rsize=1048576,wsize=1048576,hard,intr,nolock <CohesityIPTwo>:/Oracle-01/oracle-01/fs /mnt/oracle02#mount -t nfs -o noatime,vers=3,proto=tcp,rsize=1048576,wsize=1048576,hard,intr,nolock <CohesityIPThree>:/Oracle-01/oracle-01/fs /mnt/oracle03#mount -t nfs -o noatime,vers=3,proto=tcp,rsize=1048576,wsize=1048576,hard,intr,nolock <CohesityIPFour>:/Oracle-01/oracle-01/fs /mnt/oracle04

Page 16: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

Set the appropriate owner and permissions on the mounted shares

#chmod 755 /mnt/oracle-01#chown oracle:oinstall /mnt/oracle-01; where oracle is the user for the Oracle Database and oinstall is a Linux group where the user oracle is a member as an example.

Verify that the appropriate Oracle user can write to the share by creating a file on the NFS mount directory.There are two ways to make sure the mounts are persistent across server reboots. One way is to add an entry in the “fstab”.Example:Linux /etc/fstab:

Figure 20: Linux /etc/fstab entries

Second alternative is to add the mount command as part of the RMAN script. Before the RMAN script is called out, mount the necessary NFS shares and after the RMAN backup completes, remove the existing mount by invoking the umount command at the end of the script.

RMAN Protection JobsCohesity Remote Adapter: The jobs are scheduled and executed based on the policy that was applied in the RMAN protection job. Replication and archival tasks will be executed based on the policy settings. Any protection errors will be captured and displayed in the Cohesity UI.

RMAN writing to Cohesity Data Platform: The jobs will be scheduled and excluded based on any external schedule cron or any other mechanism.

Types of RMAN BackupsOracle RMAN backups can be of the following types: Full Backups is the default mode for RMAN backups. In a full backup the data files includes every allocated block in the file being backed up. A full backup of a data file can either be image copy, in which case every data block is backed up. It can also be stored in a backup set, in which case data file blocks not in use may be skipped. Most small databases that are less than 300 GB are backed up as full backups. RMAN can can also create multilevel incremental backups. Each incremental level is denoted by a value of 0 or 1. A level 0 incremental backup, which is the base for subsequent incremental backups, copies all blocks containing data. You can create a level 0 database backup as backup sets or image copies. The only difference between a level 0 incremental backup and a full backup is that a full backup is never included in an incremental strategy. Thus, an incremental level 0 backup is a full backup that happens to be the parent of incremental backups whose level is greater than 0. A level 1 incremental backup can be either of the following types: BACKUP SETS RMAN can store backup data in a logical structure called a backup set, which is the smallest unit of an RMAN backup. A backup set contains the data from one or more datafiles, archived redo logs, control files, or server parameter file. Backup sets, which are only created and accessed through RMAN. Backup sets are the only form in which RMAN can write backups to media managers such as tape drives and tape libraries. One backup set can be stored in one or multiple files. Each of those files is called a backup piece. Usually, one backup set has only one backup piece. A backup set can contain multiple datafiles. For example, you can back up 10 datafiles into a single backup set consisting of a single backup piece. In this case, RMAN creates one backup piece as output. The backup set contains only this backup piece. Image copy is an exact copy of a single data file, archived redo log file, or control file. Image copies are not stored in an RMAN-specific format. They are identical to the results of copying a file with operating system commands. RMAN can use image copies during RMAN restore and recover operations, and you can also use image copies with non-RMAN restore and recovery techniques.

15.©2018 Cohesity, All Rights Reserved

Page 17: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

16.©2018 Cohesity, All Rights Reserved

Cohesity and Oracle RMAN Recommended Best PracticesAs a web-scale platform, Cohesity thrives in conditions where workloads can write or read data across multiple processes and threads. To that end, it is best to configure Oracle and RMAN in a way that maximizes these options. The following recommended options are as follows.

Degrees of Parallelism The default value for disk parallelism is 1. Depending on the target disk, this can be changed to optimize your backup. Cohesity recommends using 1 channel per Cohesity VIP to optimize your backup. The number of channels will also depend on the number CPUs on the Oracle Server. Oracle recommendation on the max number of RMAN channels is 2 * # CPU. Recommended degree of parallelism = min {Number Cohesity Nodes , 2 * Number CPU on Oracle Server}

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 4 CHANNEL;

RMAN MAXOPENFILES and FILESPERSETFILESPERSET: Defines the maximum number of files in each backup set. The FILESPERSET default is 64. The real number of files in each backup set is the minimum of the FILESPERSET setting and the number of files read by each channel. So if you have 96 files and you open 8 channels then the filesperset would be the min(96/8 , 64) and will be set to 12. MAXOPENFILES: Defines the number of files that can be read simultaneously by each channel. The MAXOPENFILES default is 8. MAXOPENFILES affects the distribution inside the backup set. When set to 1 it will read one datafile at a time, it will write the backup data into the backup piece sequentially, When set to 8, the backup piece will have data from all the 8 datafiles mixed. FILESPERSET=8 and MAXOPENFILES=1Then the channel includes 8 datafiles in a backupset but does not multiplex the files because RMAN is not reading from more than one file simultaneously. The channel reads one file at a time and writes to the backup piece. In this case, the level of multiplexing is 1 and would result in relatively slower backups because of the throughput bottleneck. FILESPERSET=8 and MAXOPENFILES=2, the level of multiplexing is 2 and would result in a quicker more efficient backup. As Cohesity DataPlatform is a scale out storage we recommend have more input streams sending data to Cohesity DataPlatform and as a result recommends setting MAXOPENFILES parameter to either the default value or even a higher value if the Oracle Server can support sending more concurrent streams. Cohesity recommends staying with default setting for both FILESPERSET and MAXOPENFILES

RMAN MAXSETSIZEUse the default setting. This setting defines the maximum size of a backup set. The default MAXSETSIZE for a database is unlimited.

RMAN MAXPIECESIZESet to either 128GB or 256GB

This setting defines the maximum size of a backup piece. The default MAXPIECESIZE is unlimited. When it is set to default, your backup set is usually stored in 1 backup piece (If the backups are written to disk we create a one file for the backup set). During replication Cohesity DataPlatform replicates each backup piece so having multiple backup pieces improves replication performance.

RMAN>CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 128G;

RMAN Compression and/or Encryption Set both parameters to OFF.

Both compression and encryption must be disabled in RMAN to see effective deduplication. Cohesity DataPlatform does provide data at rest encryption by turning on encryption at the View Box level. Replicated and archived datasets are also encrypted.

RMAN> CONFIGURE BACKUP OPTIMIZATION OFF; RMAN> CONFIGURE ENCRYPTION FOR DATABASE OFF;

Page 18: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

17.©2018 Cohesity, All Rights Reserved

RMAN and Cohesity Source-Side DeduplicationTo utilize Cohesity Source-Side Deduplication with RMAN, the following file from Cohesity support is needed, libobk.so. Contact Cohesity support for the download location.

Once the file has been uploaded on the Oracle Database servers, Cohesity source-side deduplication can be enabled from RMAN by the following:

1. Place the Cohesity libobk.so file in a directory on the Oracle servers that needs be protected by Cohesity.2. Edit or create an RMAN script that have the following information:

a. . Add or modify the following parameters. This is only valid when using device type as SBT_TAPE: SBT_LIBRARY=<directory>/libobk.so

3. Mandatory settings on the Oracle Database servers:• Cohesity DataPlatform• mountpath: NFS mount path, for example <CohesityVIP>:/Sbtldd/SbtView1/fs • Oracle Database Servers• Mount_point: Directory where the remote path is mounted, for example, /mnt/oracle01• Vips: Colon-separated list of VIPs configured for the Cohesity Cluster, for

example, CohesityVIPOne, CohesityVIPTwo, CohesityVIPThree, etc.

Set the Appropriate QoS Policy on Cohesity View for RMANCohesity provides a number of QoS policies for RMAN Protection Jobs that can be changed dynamically. This provides DBAs and backup administrators the flexibility to tune the overall RMAN backup and restore performance to optimize and meet backup windows and restores.

The three QoS policies best applied to Oracle RMAN jobs listed below. You may choose the appropriate policy at initial view creation time as well as dynamically changing the policy as needed.

Backup Target High: This QoS policy is mainly designed for workloads such as backups which keeps lots of IOs outstanding. This policy assumes higher latency is OK and the workload will get high throughput if it issues lot of writes in parallel. The data typically lands on hard disks if it is sequential and on SSDs if it is random writes.

Backup Target SSD: This QoS policy is also designed for workloads such as backups which keeps lots of IOs outstanding. Both sequential and random IOs land on SSDs. But the IOs are not treated as high priority IOs and we assume the workload keeps lots of IOs outstanding.

TestAndDev High: This QoS policy is designed for workloads which do not keep a lot of IOs outstanding but do care about latency of the IOs. Both sequential and random writes are written to a distributed journal which writes to two separate SSDs on two different nodes and acknowledges the IO. Then in the background, the data journal flushes the IO. This ensures that the latency is lower compared to the other QoS schemes. The IOs with this QoS policy are also given higher priority compared to IOs with other QoS policies.

Page 19: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

18.©2018 Cohesity, All Rights Reserved

SummaryCohesity provides a simplified and scalable platform to solve the dual challenges of increasing database sizes and decreasing backup windows for Oracle database environments. With Cohesity, you can not only perform faster Oracle backups more reliably, but also deliver significant TCO savings through a more efficient and consolidated infrastructure.

About the AuthorApollo Aguilan is a Technical Marketing Engineer at Cohesity. In his role, Apollo focuses on Enterprise applications, databases, and data protection with Enterprise Cloud Storage.

Version HistoryVersion Date Document Version History

1.0 August 2017 Sunil Moolchandani

1.1 December 2017 Apollo Aguilan

Appendix A Example of Full RMAN backup script In this script we create 4 Oracle Channel and each channel is directed to a separate Cohesity node. RMAN script performing a full backup:

DATABASE = “Name of DB” ORACLE_HOME=/u01/OracleHomes/db/product/dbhome_1 COHESITY_DIR_PATH=/mnt/orcl1 COHESITY_DIR_PATH2=/mnt/orcl2 COHESITY_DIR_PATH3=/mnt/orcl3 COHESITY_DIR_PATH4=/mnt/orcl4set ORACLE_SID=${DATABASE}$ORACLE_HOME/bin/rman target=/ << EOFRUN {allocate channel fs1 device type disk format = ‘$COHESITY_DIR_PATH/%U’;allocate channel fs2 device type disk format = ‘$COHESITY_DIR_PATH2/%U’;allocate channel fs3 device type disk format = ‘$COHESITY_DIR_PATH3/%U’;allocate channel fs4 device type disk format = ‘$COHESITY_DIR_PATH4/%U’;backup full database plus archivelog ; RELEASE CHANNEL fs1;RELEASE CHANNEL fs2;RELEASE CHANNEL fs3; RELEASE CHANNEL fs4;}EOF

Example of Full RMAN backup script with Cohesity Oracle Source Side Dedupe

In this script we create four Oracle Channel and each channel is directed to a separate Cohesity node leveraging the Cohesity Oracle Source Side Dedupe library.

DATABASE = “Name of DB” ORACLE_HOME=/u01/OracleHomes/db/product/dbhome_1 COHESITY_DIR_PATH=/mnt/orcl1 COHESITY_DIR_PATH2=/mnt/orcl2 COHESITY_DIR_PATH3=/mnt/orcl3 COHESITY_DIR_PATH4=/mnt/orcl4set ORACLE_SID=${DATABASE}$ORACLE_HOME/bin/rman target=/ << EOFRUN {allocate channel s1 device type sbt PARMS ‘SBT_LIBRARY=/home/oracle/libsbt_7_linux-x86_64.so, SBT_PARMS=(mount_path=node1_IP:/cohesity_View, mount_point=/mnt/orcl1, vips=VIP_IP1:VIP_IP2:VIP_IP3)’;allocate channel s2 device type sbt PARMS ‘SBT_LIBRARY=/home/oracle/libsbt_7_linux-x86_64.so, SBT_PARMS=(mount_path=node2_IP:/cohesity_View, mount_point=/mnt/orcl2, vips=VIP_IP1:VIP_IP2:VIP_IP3)’;

Page 20: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

19.©2018 Cohesity, All Rights Reserved

allocate channel s3 device type sbt PARMS ‘SBT_LIBRARY=/home/oracle/libsbt_7_linux-x86_64.so, SBT_PARMS=(mount_path=node3_IP:/cohesity_View, mount_point=/mnt/orcl3, vips=VIP_IP1:VIP_IP2:VIP_IP3)’;allocate channel s4 device type sbt PARMS ‘SBT_LIBRARY=/home/oracle/libsbt_7_linux-x86_64.so, SBT_PARMS=(mount_path=node4_IP:/cohesity_View, mount_point=//mnt/orcl4, vips=VIP_IP1:VIP_IP2:VIP_IP3)’;backupfull database tag ORA11G_FULL;release channel s1;release channel s2;release channel s3;release channel s4;}EOF

Example of Incremental RMAN backup scriptIn this script we create 4 Oracle Channel and each channel is directed to a separate Cohesity node. RMAN script performing an incremental backup:

DATABASE = “Name of DB” ORACLE_HOME=/u01/OracleHomes/db/product/dbhome_1 COHESITY_DIR_PATH=/mnt/orcl1 COHESITY_DIR_PATH2=/mnt/orcl2 COHESITY_DIR_PATH3=/mnt/orcl3 COHESITY_DIR_PATH4=/mnt/orcl4set ORACLE_SID=${DATABASE}$ORACLE_HOME/bin/rman target=/ << EOFRUN {allocate channel fs1 device type disk format = ‘$COHESITY_DIR_PATH/%U’;allocate channel fs2 device type disk format = ‘$COHESITY_DIR_PATH2/%U’;allocate channel fs3 device type disk format = ‘$COHESITY_DIR_PATH3/%U’;allocate channel fs4 device type disk format = ‘$COHESITY_DIR_PATH4/%U’;backup incremental level = 1 database plus archivelog ; RELEASE CHANNEL fs1;RELEASE CHANNEL fs2;RELEASE CHANNEL fs3; RELEASE CHANNEL fs4;}EOF

Example of RMAN restore and recovery scriptIn this script we create 4 Oracle channel and each channel is directed to a separate Cohesity node. RMAN script is perform-ing a restore and recovery of the database:

DATABASE = “Name of DB” ORACLE_HOME=/u01/OracleHomes/db/product/dbhome_1 COHESITY_DIR_PATH=/mnt/orcl1 COHESITY_DIR_PATH2=/mnt/orcl2 COHESITY_DIR_PATH3=/mnt/orcl3 COHESITY_DIR_PATH4=/mnt/orcl4set ORACLE_SID=${DATABASE}$ORACLE_HOME/bin/rman target=/ << EOFRUN {allocate channel fs1 device type disk format = ‘$COHESITY_DIR_PATH/%U’;allocate channel fs2 device type disk format = ‘$COHESITY_DIR_PATH2/%U’;allocate channel fs3 device type disk format = ‘$COHESITY_DIR_PATH3/%U’;allocate channel fs4 device type disk format = ‘$COHESITY_DIR_PATH4/%U’;restore database;recover database;RELEASE CHANNEL fs1;RELEASE CHANNEL fs2;RELEASE CHANNEL fs3;

Page 21: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

20.©2018 Cohesity, All Rights Reserved

RELEASE CHANNEL fs4;}EOFExample of RMAN Image Copy ScriptIn this script we create 4 Oracle channel and each channel is directed to a separate Cohesity node. RMAN script performing an image copy of the Oracle database: DATABASE= “Name of DB” ORACLE_HOME=/u01/OracleHomes/db/product/dbhome_1 COHESITY_DIR_PATH=/mnt/orcl1COHESITY_DIR_PATH2=/mnt/orcl2COHESITY_DIR_PATH3=/mnt/orcl3COHESITY_DIR_PATH4=/mnt/orcl4set ORACLE_SID=${DATABASE}$ORACLE_HOME/bin/rman target=/ << EOFRUN {allocate channel fs1 device type disk format=’$COHESITY_DIR_PATH/%U’; allocate channel fs2 device type disk format=’$COHESITY_DIR_PATH2/%U’; allocate channel fs3 device type disk format=’$COHESITY_DIR_PATH3/%U’; allocate channel fs4 device type disk format=’$COHESITY_DIR_PATH4/%U’; backup incremental level 1 for recover of copy with tag ‘ORCL_DB_TAG’ database;RELEASE CHANNEL fs1;RELEASE CHANNEL fs2; RELEASE CHANNEL fs3;RELEASE CHANNEL fs4;} EOF Sample SQL Queries for Managing and Monitoring RMAN

SQL Query Description

select sid,program,status,module,action,client_info from v$session where program like (‘rman%’);

Run this query on the DB Server during an RMAN backup to see the number of RMAN sessions and mapping RMAN sessions to channels

select a.sid,b.status,b.serial#,start_time,total-work,sofar, (sofar/totalwork) * 100 pct_done from v$session_longops a, V$session b where totalwork > sofar AND opname NOT LIKE ‘%ag-gregate%’ AND a.sid=b.sid AND opname like ‘RMAN%’;

Run this query to see if the RMAN channe are progressing

select start_time,end_time,status,command_id,-session_recid,input_bytes_display, output_bytes_display, output_bytes_per_sec_display, time_tak-en_display from v$rman_backup_job_details order by start_time DESC;

RMAN backup throughput

select to_char(start_time,’yyyy-mm-dd:h-h24:mi:ss’) start_time, to_char(end_time, ‘yyyy-mm-dd:hh24:mi:ss’) end_time, output_bytes from v$rman_backup_job_details order by start_time;

Queries the backup files generated by RMAN

Page 22: Cohesity and Oracle RMAN Guide · Cohesity and Oracle RMAN Overview & Benefits Application owners and database admins face the challenge of protecting a large ... Native cloud integration

14.©2018 Cohesity, All Rights Reserved

14.

About CohesityCohesity delivers the industry’s first solution for secondary storageconsolidation. Cohesity enables companies of all sizes to bring order to their data chaos by converging storage workloads, including file services, data protection, Test/Dev, and in-place analytics, onto an infinitely scalable, intelligent data platform. With Cohesity, customers can manage and protect data seamlessly, use it efficiently, and learn from it instantly. Cohesity is headquartered in the heart of Silicon Valley, California with a global presence across the Americas, EMEA, and APAC.

Cohesity, Inc. Address 300 Park Ave., Suite 300, San Jose, CA 95110Email [email protected] www.cohesity.com ©2018 Cohesity. All Rights Reserved.

@cohesity