AWS Storage Blog

Protect Oracle Databases on Amazon EC2 using NetApp SnapCenter with Amazon FSx for NetApp ONTAP

Oracle databases typically see significant data growth which in turn increases backup, restore and database refresh times. The need to quickly backup, restore, and refresh large-scale databases is important for ensuring data consistency, business continuity, and accelerating testing and development processes. As more businesses migrate their Oracle databases to Amazon Elastic Compute Cloud (EC2) instances, ensuring robust data protection becomes crucial.

With Amazon FSx for NetApp ONTAP (FSx for ONTAP), you can use NetApp SnapCenter, to simplify how you protect and refresh your Oracle Databases. SnapCenter provides an intuitive user interface (UI) to perform advanced backup and restore procedures that leverage NetApp ONTAP Snapshots. Snapshots provide near-instantaneous point-in-time copies of Oracle databases, allowing for quick and reliable restores. With just a few clicks, administrators can create consistent, space-efficient backups, ensuring data integrity and recoverability. SnapCenter’s intuitive GUI allows users to define backup schedules, retention policies, and encryption settings, providing comprehensive data protection for your Oracle workloads.

SnapCenter’s cloning capabilities enable efficient creation of database copies for development, testing, or reporting purposes. By leveraging ONTAP Snapshots and FlexClones, clones of volumes containing your database can be rapidly provisioned, ensuring data consistency and agility for various use cases. In addition, FSx for ONTAP’s storage efficiencies, including de-duplication, compression, and thin provisioning, optimize storage utilization and reduce costs. The flexible and scalable architecture of FSx for ONTAP ensures that your Oracle databases can grow seamlessly with your business needs while maintaining high performance and reliability.

This blog post explores the powerful features and benefits of integrating SnapCenter and FSx for ONTAP to protect and refresh your Oracle databases running on Amazon Elastic Compute Cloud (EC2) with Oracle Automatic Storage Management (ASM) diskgroups.

NetApp SnapCenter overview

SnapCenter is a unified platform for application-consistent data protection. SnapCenter refers to snapshots as backups, which differ from Amazon FSx’s native offline backups in that snapshots are online backups stored within your file system–but for the sake of consistency with SnapCenter, we’ll be referring to snapshots as “backups” for the remainder of this post. SnapCenter provides a single pane of glass for managing application-consistent backups, restores, and clones. You add a SnapCenter plug-in for your specific database application to create application-consistent backups.

The SnapCenter plug-in for Oracle provides the following functionality that simplifies your data protection workflow:

  • Automated discovery of databases
  • Backup and restore options with granularity for full and log backups
  • In-place restore and restore to an alternate location
  • Ability to clone a backup to an alternate Oracle server within SnapCenter
  • Refresh clones with production data on a regular cadence
  • Disaster recovery with replication of backups via SnapMirror

Before deploying SnapCenter, you should consider these best practices:

  • Snapshots created automatically by each volume’s snapshot policy aren’t application-consistent. Therefore, disable automatic snapshots by setting the volume’s snapshot policy to “none”.
  • Separate your database workloads across different volumes, file systems or ASM Diskgroups depending on their performance requirements.
  • When cloning databases, make sure to have at least 0.5% of volume space available for the clone metadata.

For additional best practices and consideration, see SnapCenter Plugin for Oracle Database – Best Practices.

Solution overview

FSx for ONTAP is a fully managed service that provides highly reliable, scalable, high-performing, and feature-rich file storage built on NetApp’s popular ONTAP file system. When combined with NetApp SnapCenter, it offers a comprehensive data protection solution for Oracle databases.

The key components of this solution include FSx for ONTAP, which provides the underlying storage infrastructure; NetApp SnapCenter, offering application-consistent backups, restores, and cloning for Oracle databases; and the Oracle Database itself, which is the workload being protected.

Figure 1 - Oracle DB Cloning with SnapCenter (FSx for ONTAP)

Figure 1: Oracle DB cloning with SnapCenter (FSx for ONTAP)

This integrated solution offers numerous benefits for Oracle database protection as shown in Figure 1. It enables rapid backups and restores using NetApp Snapshot technology, ensures application-consistent backups for data integrity, and provides efficient storage utilization through thin provisioning and data deduplication. The seamless integration with cloud-native services and simplified management through SnapCenter’s centralized interface further enhances its appeal for organizations looking to optimize their database protection strategies in the cloud.

Prerequisites

  1. Deploy and configure an Amazon EC2 instance with an Oracle 19c Database using FSx for ONTAP with iSCSI/ASM. For a NetApp solutions overview, refer to TR-4965: Oracle Database Deployment and Protection in AWS FSx/EC2 with iSCSI/ASM.
  1. Review the SnapCenter Server Installation workflow. Launch an Amazon EC2 Windows 2019 instance (c5.xlarge with 50 GB gp3). We use this to run SnapCenter. For instructions on Amazon EC2 deployment, refer to Launch an instance using the new launch instance wizard.

Deploy and configure SnapCenter

The steps to download and install NetApp SnapCenter are documented in Install the SnapCenter Server.

In order to download the SnapCenter software, you’ll need to sign up for a NetApp account. No additional licensing is required to use SnapCenter software with FSx for NetApp ONTAP. The instructions can be found in the AWS FSx for ONTAP AWS ONTAP Managing Resources user guide.

Configure SnapCenter Database Credentials

1. Launch SnapCenter and log in using a domain user with local administrator rights.

2. Within SnapCenter, choose Settings in the navigation pane.

3. On the Credential tab, choose NEW.

4. Enter the following information as shown in Figure 2:

a. For Credential Name, enter ec2-user-demo-oradb01

b. For Authentication Mode, enter Linux

c. For Authentication Type, click the SSH Key Based radio option

d. For Username, enter ec2-user

e. For SSH Private Key, enter the 3072 bit RSA private key of the user that SnapCenter will use to connect to the host. In our case, it’s the ec2-user’s private 3072 bit RSA key.

Figure 2 – SnapCenter Adding SSH Key based credentials

Figure 2: SnapCenter Adding SSH Key based credentials

Add a Storage Virtual Machine (SVM) to SnapCenter

1. In the Amazon FSx console, navigate to the storage virtual machines (SVMs) that you created that are hosting the LUNs mounted on your EC2 database host, and identify the value of the Management IP address as shown in Figure 3.

	 		Figure 3 – Navigating to the FSx for NetApp ONTAP storage virtual machine

Figure 3: Navigating to the FSx for NetApp ONTAP storage virtual machine

2. Within SnapCenter, choose Storage Systems in the left navigation pane as in Figure 4.

3. Choose New.

4. Enter the following information:

a. For Storage System, enter the management IP of the SVM.

b. For Username, enter vsadmin, as this is the SVM-specific user. It defaults to vsadmin unless you change the default.

c. For Password, enter the password for the user.

5. Click Submit

Figure4-Add-FSxN-IP

Figure 4: Adding the FSx for NetApp ONTAP storage system

Add a host to SnapCenter

1. Within SnapCenter, choose Hosts in the left navigation pane as in Figure 5.

2. On the Managed Hosts tab, click Add

3. Enter the following information:

a. For Host Name, enter the fully qualified domain name (FQDN) or the IP address of the EC2 database host.

b. For Credentials, choose the credentials created earlier from the drop-down.

c. Check the Oracle Database plugin to install.

When adding an Oracle database host, SnapCenter will deploy the required plugins on the database host and executes auto-discovery on the host.

Figure 5 – Adding the EC2 Oracle database host

Figure 5: Adding the EC2 Oracle database host

We can repeat the adding credentials and adding a host process for one or more servers in your configuration. When the agent is done deploying, the Overall status should change to Running.

For this demonstration, we have added two hosts “demo-oradb01” and “demo-oradb02”. We will use the second host “demo-oradb02” as a clone target host as shown in Figure 6.

Figure 6 – Managed hosts landing page

Figure 6: Managed hosts landing page

Configure backups with SnapCenter

To configure database and log backups with SnapCenter, complete the following steps:

Configure a backup policy

  1. Within SnapCenter, choose Settings in the left navigation pane.
  2. Click on the Policies
  3. Click the New button to create a new backup policy.

In Figure 7 below we’ve created a policy that takes a full backup (data & logs) online and it can be run on-demand. SnapCenter has the ability to create backup policies on a hourly, daily, weekly or monthly schedule.

Figure 7 – Main Policies landing page

Figure 7: Main Policies landing page

Apply the policy to a database resource

  1. Within SnapCenter, choose Resources in the left navigation pane as in Figure 8.
  2. Filter to identify your database resource.
  3. When you highlight the resource in the main pane, a 5-step menu will pop up for you to apply a policy to the “unprotected” resource.
  4. Click Finish.

Figure 8 – Adding a policy to an unprocted database resource

Figure 8: Adding a policy to an unprotected database resource.

Taking a database backup

Once a policy has been added to a resource, the main landing page will provide details on the number of backups and clones for this resource as in Figure 9.

  1. To take a backup with SnapCenter, click the Back up Now (on-demand option).
  2. A pop-up menu will display where you can pick a Policy from a drop-down.
  3. Select a policy and click Backup.

Figure 9 – Resource landing page after a backup policy has been added

Figure 9: Resource landing page after a backup policy has been added.

The activity bar at the bottom of page shows us the status of the backup job as in Figure 10. As an alternative, you can click Monitor in the left navigation pane to see the status and progress of any job.

Figure 10– Monitoring the backup job

Figure 10: Monitoring the backup job

Restoring a database with SnapCenter

With SnapCenter, we can restore all the data files for a database, or a specific pluggable database as in Figure 11.

  1. Within SnapCenter, choose Resources from the left navigation pane and select the database db1.
  2. Choose and highlight the Data backup that you want to restore from.
  3. Click the Restore button in the lower left hand side.
  4. A pop up menu will appear where it will prompt you on what type of restore function you want to perform. For this demonstration, we will restore one of the pluggable databases in place.

Figure 11– Restoring a PDB from a backup

Figure 11: Restoring a PDB from a backup

 

Cloning a database

SnapCenter facilitates efficient database cloning for testing or development purposes. Select the source backup and target location, configure clone settings, and initiate the clone operation. This feature is particularly valuable for creating up-to-date test environments or for quickly provisioning development instances.

  1. In the main resource page, highlight the Data backup that you want to use as shown in Figure 12.
  2. Click the Clone button in the lower left hand side as in Figure 13.
  3. A pop up menu will prompt you for various configurations including which host to clone to.
  4. Click Finish.

Figure 12– Cloning a database to another host

Figure 12: Cloning a database to another host

Figure 13– Cloning a database to another host

Figure 13: Cloning a database to another host

Final considerations

To maximize the effectiveness of this solution, we recommend:

  • Regularly testing your backup and restore processes.
  • Using Oracle RMAN alongside SnapCenter for comprehensive protection.
  • Implementing a tiered backup strategy combining daily and weekly backups.
  • Monitoring your SnapCenter and FSx for ONTAP metrics.
  • Keeping your SnapCenter software and Oracle databases up to date.

Cleaning up

When you’re finished using the resources in this post, clean up the AWS resources to avoid incurring unwanted charges. Specifically, delete the following:

Conclusion

Using NetApp SnapCenter with FSx for ONTAP provides a powerful, efficient, and user-friendly solution for protecting Oracle database workloads in the cloud. This combination offers fast backups, quick restores, and efficient cloning capabilities, all while leveraging the scalability and cost-effectiveness of cloud infrastructure. By implementing this solution, organizations can ensure their critical Oracle databases remain protected and readily available, even as they embrace the benefits of cloud computing.

Eric Felice

Eric Felice

Eric Felice is a Sr. Database Solutions Architect at Amazon Web Services (AWS), bringing over two decades of experience in database technologies. He specializes in helping customers migrate, modernize, and optimize their database solutions using AWS's purpose-built database services. Eric is passionate about empowering organizations to leverage the full potential of cloud-native technologies, improving performance, scalability, and cost-efficiency.

Jesse Bieber

Jesse Bieber

Jesse Bieber is a Solutions Architect with a focus on storage services at AWS. Jesse has over 20 years of technical experience across enterprise, commercial and government sectors with an engineering background focused on data center infrastructure, implementation and management of compute and storage, and cloud migration strategies. He has a passion for music and playing the guitar.

Niyaz Mohamed

Niyaz Mohamed

Niyaz Mohamed aka NiMo is a Principal Technical Marketing Engineer in the Product Solutions Engineering BU at NetApp. He has over 16 years of experience in the IT industry and joined NetApp in 2011 from Microsoft. He leads hybrid and cloud solutions for keys areas like databases, virtualization, Kubernetes, AI/ML and so on. He also helps drive and validate product design, roadmaps, strategy, and customer experience for NetApp Cloud offerings and evangelizes services like FSx for ONTAP, Cloud Volumes ONTAP, Cloud Insights, Data Sense and more.

Peter Santos

Peter Santos

Peter Santos is a Sr. Data Specialist Architect Manager with Amazon Web Services. Prior to joining Amazon in 2020, he worked in various Cloud and database engineering roles helping companies derive value from data solutions.