Skip to main content
NetApp Solutions

TR-4988: Oracle Database Backup, Recovery, and Clone on ANF with SnapCenter

Contributors kevin-hoke acao8888

Allen Cao, Niyaz Mohamed, NetApp

This solution provides overview and details for automated Oracle deployment in Microsoft Azure NetApp Files as primary database storage with NFS protocol and Oracle database is deployed as container database with dNFS enabled. Database deployed in Azure is protected using SnapCenter UI tool for simplified database management.

Purpose

NetApp SnapCenter software is an easy-to-use enterprise platform to securely coordinate and manage data protection across applications, databases, and file systems. It simplifies backup, restore, and clone lifecycle management by offloading these tasks to application owners without sacrificing the ability to oversee and regulate activity on the storage systems. By leveraging storage-based data management, it enables increased performance and availability, as well as reduced testing and development times.

In TR-4987, Simplified, Automated Oracle Deployment on Azure NetApp Files with NFS, we demonstrate automated Oracle deployment on Azure NetApp Files (ANF)in Azure cloud. In this documentation, we showcase Oracle database protection and management on ANF in Azure cloud with a very user-friendly SnapCenter UI tool.

This solution addresses the following use cases:

  • Backup and recovery of Oracle database deployed on ANF in Azure cloud with SnapCenter.

  • Manage database snapshots and clone copies to accelerate application development and improve data lifecycle management.

Audience

This solution is intended for the following people:

  • A DBA who would like to deploy Oracle databases on Azure NetApp Files.

  • A database solution architect who would like to test Oracle workloads on Azure NetApp Files.

  • A storage administrator who would like to deploy and manage Oracle databases on Azure NetApp Files.

  • An application owner who would like to stand up an Oracle database on Azure NetApp Files.

Solution test and validation environment

The testing and validation of this solution were performed in a lab setting that might not match the final deployment environment. See the section Key factors for deployment consideration for more information.

Architecture

This image provides a detailed picture of the Oracle deployment configuration in AWS public cloud with iSCSI and ASM.

Hardware and software components

Hardware

Azure NetApp Files

Current offering in Azure by Microsoft

A capacity pool with Premium service level

Azure VM for DB server

Standard_B4ms - 4 vCPUs, 16GiB

Two Linux virtual machine instances

Azure VM for SnapCenter

Standard_B4ms - 4 vCPUs, 16GiB

One Windows virtual machine instance

Software

RedHat Linux

RHEL Linux 8.6 (LVM) - x64 Gen2

Deployed RedHat subscription for testing

Windows Server

2022 DataCenter; AE Hotpatch - x64 Gen2

Hosting SnapCenter server

Oracle Database

Version 19.18

Patch p34765931_190000_Linux-x86-64.zip

Oracle OPatch

Version 12.2.0.1.36

Patch p6880880_190000_Linux-x86-64.zip

SnapCenter Server

Version 5.0

Workgroup deployment

Open JDK

Version java-11-openjdk

SnapCenter plugin requirement on DB VMs

NFS

Version 3.0

Oracle dNFS enabled

Ansible

core 2.16.2

Python 3.6.8

Oracle database configuration in the lab environment

Server

Database

DB Storage

ora-01

NTAP1(NTAP1_PDB1,NTAP1_PDB2,NTAP1_PDB3)

/u01, /u02, /u03 NFS mounts on ANF capacity pool

ora-02

NTAP2(NTAP2_PDB1,NTAP2_PDB2,NTAP2_PDB3)

/u01, /u02, /u03 NFS mounts on ANF capacity pool

Key factors for deployment consideration

  • SnapCenter deployment. SnapCenter can deploy in a Windows domain or Workgroup environment. For domain-based deployment, the domain user account should be a domain administrator account, or the domain user belongs to the local administrator's group on the SnapCenter hosting server.

  • Name resolution. SnapCenter server needs to resolve the name to the IP address for each managed target database server host. Each target database server host must resolve the SnapCenter server name to the IP address. If a DNS server is unavailable, add naming to local host files for resolution.

  • Resource group configuration. Resource group in SnapCenter is a logical grouping of similar resources that can be backed up together. Thus, it simplifies and reduces the number of backup jobs in a large database environment.

  • Separate full database and archive log backup. Full database backup includes data volumes and log volumes consistent group snapshots. A frequent full database snapshot incurs higher storage consumption but improves RTO. An alternative is less frequent full database snapshots and more frequent archive logs backup, which consumes less storage and improves RPO but may extend RTO. Consider your RTO and RPO objectives when setting up the backup scheme. There is also a limit (1023) of the number of snapshot backups on a volume.

  • Privileges delegation. Leverage role based access control that is built-in within SnapCenter UI to delegate privileges to application and database teams if desired.

Solution deployment

The following sections provide step-by-step procedures for SnapCenter deployment, configuration, and Oracle database backup, recovery, and clone on Azure NetApp Files in the Azure cloud.

Prerequisites for deployment

Details

Deployment requires existing Oracle databases running on ANF in Azure. If not, follow the steps below to create two Oracle databases for solution validation. For details of Oracle database deployment on ANF in Azure cloud with automation, referred to TR-4987: Simplified, Automated Oracle Deployment on Azure NetApp Files with NFS

  1. An Azure account has been set up, and the necessary VNet and network segments have been created within your Azure account.

  2. From the Azure cloud portal, deploy Azure Linux VMs as Oracle DB servers. Create an Azure NetApp Files capacity pool and database volumes for Oracle database. Enable VM SSH private/public key authentication for azureuser to DB servers. See the architecture diagram in the previous section for details about the environment setup. Also referred to Step-by-Step Oracle deployment procedures on Azure VM and Azure NetApp Files for detailed information.

    Note For Azure VMs deployed with local disk redundancy, ensure that you have allocated at least 128G in the VM root disk to have sufficient space to stage Oracle installation files and add OS swap file. Expand /tmplv and /rootlv OS partition accordingly. Ensure the database volume naming follows the VMname-u01, VMname-u02, and VMname-u03 convention.
    sudo lvresize -r -L +20G /dev/mapper/rootvg-rootlv
    sudo lvresize -r -L +10G /dev/mapper/rootvg-tmplv
  3. From the Azure cloud portal, provision a Windows server to run the NetApp SnapCenter UI tool with the latest version. Refer to the following link for details: Install the SnapCenter Server.

  4. Provision a Linux VM as the Ansible controller node with the latest version of Ansible and Git installed. Refer to the following link for details: Getting Started with NetApp solution automation in section -
    Setup the Ansible Control Node for CLI deployments on RHEL / CentOS or
    Setup the Ansible Control Node for CLI deployments on Ubuntu / Debian.

    Note The Ansible controller node can locate either on-premisses or in Azure cloud as far as it can reach Azure DB VMs via ssh port.
  5. Clone a copy of the NetApp Oracle deployment automation toolkit for NFS. Follow instructions in TR-4887 to execute the playbooks.

    git clone https://bitbucket.ngage.netapp.com/scm/ns-bb/na_oracle_deploy_nfs.git
  6. Stage following Oracle 19c installation files on Azure DB VM /tmp/archive directory with 777 permission.

    installer_archives:
      - "LINUX.X64_193000_db_home.zip"
      - "p34765931_190000_Linux-x86-64.zip"
      - "p6880880_190000_Linux-x86-64.zip"
  7. Watch the following video:

    Oracle Database Backup, Recovery, and Clone on ANF with SnapCenter
  8. Review the Get Started online menu.

SnapCenter installation and setup

Details

We recommend to go through online SnapCenter Software documentation before proceeding to SnapCenter installation and configuration: . Following provides a high level summary of steps for installation and setup of SnapCenter software for Oracle on Azure ANF.

  1. From SnapCenter Windows server, download and install latest java JDK from Get Java for desktop applications.

  2. From SnapCenter Windows server, download and install latest version (currently 5.0) of SnapCenter installation executable from NetApp support site: NetApp | Support.

  3. After SnapCenter server installation, launch browser to login to SnapCenter with Windows local admin user or domain user credential via port 8146.

    This image provides login screen for SnapCenter server

  4. Review Get Started online menu.

    This image provides online menu for SnapCenter server

  5. In Settings-Global Settings, check Hypervisor Settings and click on Update.

    This image provides Hypervisor Settings for SnapCenter server

  6. If needed, adjust Session Timeout for SnapCenter UI to the desired interval.

    This image provides Session Timeout for SnapCenter server

  7. Add additional users to SnapCenter if needed.

    This image provides Settings-Users and Access for SnapCenter server

  8. The Roles tab list the built-in roles that can be assigned to different SnapCenter users. Custom roles also can be created by admin user with desired privileges.

    This image provides Roles for SnapCenter server

  9. From Settings-Credential, create credentials for SnapCenter management targets. In this demo use case, they are linux user for login to Azure VM and ANF credential for capacity pool access.

    This image provides Credentials for SnapCenter server
    This image provides Credentials for SnapCenter server
    This image provides Credentials for SnapCenter server

  10. From Storage Systems tab, add Azure NetApp Files with credential created above.

    This image provides Azure NetApp Files for SnapCenter server
    This image provides Azure NetApp Files for SnapCenter server

  11. From Hosts tab, add Azure DB VMs, which installs SnapCenter plugin for Oracle on Linux.

    This image provides Hosts for SnapCenter server
    This image provides Hosts for SnapCenter server
    This image provides Hosts for SnapCenter server

  12. Once host plugin is installed on DB server VM, databases on the host are auto discovered and visible in Resources tab. Back to Settings-Polices, create backup policies for full Oracle database online backup and archive logs only backup. Refer to this document Create backup policies for Oracle databases for detailed step by step procedures.

    This image provides Settings-Policies for SnapCenter server

Database backup

Details

A NetApp snapshot backup creates a point-in-time image of the database volumes that you can use to restore in case of a system failure or data loss. Snapshot backups take very little time, usually less than a minute. The backup image consumes minimal storage space and incurs negligible performance overhead because it records only changes to files since the last snapshot copy was made. Following section demonstrates the implementation of snapshots for Oracle database backup in SnapCenter.

  1. Navigating to Resources tab, which lists the databases discovered once SnapCenter plugin installed on database VM. Initially, the Overall Status of database shows as Not protected.

    This image provides database backup for SnapCenter server

  2. Click on View drop-down to change to Resource Group. Click on Add sign on the right to add a Resource Group.

    This image provides database backup for SnapCenter server

  3. Name your resource group, tags, and any custom naming.

    This image provides database backup for SnapCenter server

  4. Add resources to your Resource Group. Grouping of similar resources can simplify database management in a large environment.

    This image provides database backup for SnapCenter server

  5. Select the backup policy and set a schedule by click on '+' sign under Configure Schedules.

    This image provides database backup for SnapCenter server
    This image provides database backup for SnapCenter server

  6. If backup verification is not configured in policy, leave verification page as is.

    This image provides database backup for SnapCenter server

  7. In order to email a backup report and notification, a SMTP mail server is needed in the environment. Or leave it black if a mail server is not setup.

    This image provides database backup for SnapCenter server

  8. Summary of new resource group.

    This image provides database backup for SnapCenter server

  9. Repeat the above procedures to create a database archive log only backup with corresponding backup policy.

    This image provides database backup for SnapCenter server

  10. Click on a resource group to reveal the resources it includes. Besides the scheduled backup job, an one-off backup can be triggered by clicking on Backup Now.

    This image provides database backup for SnapCenter server
    This image provides database backup for SnapCenter server

  11. Click on the running job to open a monitoring window, which allows the operator to track the job progress in real-time.

    This image provides database backup for SnapCenter server

  12. A snapshot backup set appears under database topology once a successful backup job finishes. A full database backup set includes a snapshot of the database data volumes and a snapshot of the database log volumes. A log-only backup contains only a snapshot of the database log volumes.

    This image provides database backup for SnapCenter server

Database recovery

Details

Database recovery via SnapCenter restores a snapshot copy of the database volume image point-in-time. The database is then rolled forward to a desired point by SCN/timestamp or a point as allowed by available archive logs in the backup set. The following section demonstrates the workflow of database recovery with SnapCenter UI.

  1. From Resources tab, open the database Primary Backup(s) page. Choose the snapshot of database data volume, then click on Restore button to launch database recovery workflow. Note the SCN number or timestamp in the backup sets if you like to run the recovery by Oracle SCN or timestamp.

    This image provides database restore for SnapCenter server

  2. Select Restore Scope. For a container database, SnapCenter is flexible to perform a full container database (All Datafiles), pluggable databases, or tablespaces level restore.

    This image provides database restore for SnapCenter server

  3. Select Recovery Scope. All logs means to apply all available archive logs in the backup set. Point-in-time recovery by SCN or timestamp are also available.

    This image provides database restore for SnapCenter server

  4. The PreOps allows execution of scripts against database before restore/recovery operation.

    This image provides database restore for SnapCenter server

  5. The PostOps allows execution of scripts against database after restore/recovery operation.

    This image provides database restore for SnapCenter server

  6. Notification via email if desired.

    This image provides database restore for SnapCenter server

  7. Restore job summary

    This image provides database restore for SnapCenter server

  8. Click on running job to open Job Details window. The job status can also be opened and viewed from the Monitor tab.

    This image provides database restore for SnapCenter server

Database clone

Details

Database clone via SnapCenter is accomplished by creating a new volume from a snapshot of a volume. The system uses the snapshot information to clone a new volume using the data on the volume when the snapshot was taken. More importantly, it is quick (a few minutes) and efficient compared with other methods to make a cloned copy of the production database to support development or testing. Thus, dramatically improve your database application lifecycle management. The following section demonstrates the workflow of database clone with SnapCenter UI.

  1. From Resources tab, open the database Primary Backup(s) page. Choose the snapshot of database data volume, then click on clone button to launch database clone workflow.

    This image provides database clone for SnapCenter server

  2. Name the clone database SID. Optionally, for a container database, clone can be done at PDB level as well.

    This image provides database clone for SnapCenter server

  3. Select the DB server where you want to place your cloned database copy. Keep the default file locations unless you want to name them differently.

    This image provides database clone for SnapCenter server

  4. Identical Oracle software stack as in source database should have been installed and configured on clone DB host. Keep the default credential but change Oracle Home Settings to match with settings on clone DB host.

    This image provides database clone for SnapCenter server

  5. The PreOps allows execution of scripts before clone operation. Database parameters can be adjusted to meet a clone DB needs as versus a production database, such as reduced SGA target.

    This image provides database clone for SnapCenter server

  6. The PostOps allows execution of scripts against database after clone operation. Clone database recovery can be SCN, timestamp based, or Until cancel (rolling forward database to last archived log in the backup set).

    This image provides database clone for SnapCenter server

  7. Notification via email if desired.

    This image provides database clone for SnapCenter server

  8. Clone job summary.

    This image provides database clone for SnapCenter server

  9. Click on running job to open Job Details window. The job status can also be opened and viewed from the Monitor tab.

    This image provides database restore for SnapCenter server

  10. Cloned database registers with SnapCenter immediately.

    This image provides database restore for SnapCenter server

  11. Validate clone database on DB server host. For a cloned development database, database archive mode should be turned off.

    [azureuser@ora-02 ~]$ sudo su
    [root@ora-02 azureuser]# su - oracle
    Last login: Tue Feb  6 16:26:28 UTC 2024 on pts/0
    
    [oracle@ora-02 ~]$ uname -a
    Linux ora-02 4.18.0-372.9.1.el8.x86_64 #1 SMP Fri Apr 15 22:12:19 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
    [oracle@ora-02 ~]$ df -h
    Filesystem                                       Size  Used Avail Use% Mounted on
    devtmpfs                                         7.7G     0  7.7G   0% /dev
    tmpfs                                            7.8G     0  7.8G   0% /dev/shm
    tmpfs                                            7.8G   49M  7.7G   1% /run
    tmpfs                                            7.8G     0  7.8G   0% /sys/fs/cgroup
    /dev/mapper/rootvg-rootlv                         22G   17G  5.6G  75% /
    /dev/mapper/rootvg-usrlv                          10G  2.0G  8.1G  20% /usr
    /dev/mapper/rootvg-homelv                       1014M   40M  975M   4% /home
    /dev/sda1                                        496M  106M  390M  22% /boot
    /dev/mapper/rootvg-varlv                         8.0G  958M  7.1G  12% /var
    /dev/sda15                                       495M  5.9M  489M   2% /boot/efi
    /dev/mapper/rootvg-tmplv                          12G  8.4G  3.7G  70% /tmp
    tmpfs                                            1.6G     0  1.6G   0% /run/user/54321
    172.30.136.68:/ora-02-u03                        250G  2.1G  248G   1% /u03
    172.30.136.68:/ora-02-u01                        100G   10G   91G  10% /u01
    172.30.136.68:/ora-02-u02                        250G  7.5G  243G   3% /u02
    tmpfs                                            1.6G     0  1.6G   0% /run/user/1000
    tmpfs                                            1.6G     0  1.6G   0% /run/user/0
    172.30.136.68:/ora-01-u02-Clone-020624161543077  250G  8.2G  242G   4% /u02_ntap1dev
    
    [oracle@ora-02 ~]$ cat /etc/oratab
    #
    # This file is used by ORACLE utilities.  It is created by root.sh
    # and updated by either Database Configuration Assistant while creating
    # a database or ASM Configuration Assistant while creating ASM instance.
    
    # A colon, ':', is used as the field terminator.  A new line terminates
    # the entry.  Lines beginning with a pound sign, '#', are comments.
    #
    # Entries are of the form:
    #   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    #
    # The first and second fields are the system identifier and home
    # directory of the database respectively.  The third field indicates
    # to the dbstart utility that the database should , "Y", or should not,
    # "N", be brought up at system boot time.
    #
    # Multiple entries with the same $ORACLE_SID are not allowed.
    #
    #
    NTAP2:/u01/app/oracle/product/19.0.0/NTAP2:Y
    # SnapCenter Plug-in for Oracle Database generated entry (DO NOT REMOVE THIS LINE)
    ntap1dev:/u01/app/oracle/product/19.0.0/NTAP2:N
    
    
    [oracle@ora-02 ~]$ export ORACLE_SID=ntap1dev
    [oracle@ora-02 ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Tue Feb 6 16:29:02 2024
    Version 19.18.0.0.0
    
    Copyright (c) 1982, 2022, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.18.0.0.0
    
    SQL> select name, open_mode, log_mode from v$database;
    
    NAME      OPEN_MODE            LOG_MODE
    --------- -------------------- ------------
    NTAP1DEV  READ WRITE           ARCHIVELOG
    
    
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance started.
    
    Total System Global Area 3221223168 bytes
    Fixed Size                  9168640 bytes
    Variable Size             654311424 bytes
    Database Buffers         2550136832 bytes
    Redo Buffers                7606272 bytes
    Database mounted.
    
    SQL> alter database noarchivelog;
    
    Database altered.
    
    SQL> alter database open;
    
    Database altered.
    
    SQL> select name, open_mode, log_mode from v$database;
    
    NAME      OPEN_MODE            LOG_MODE
    --------- -------------------- ------------
    NTAP1DEV  READ WRITE           NOARCHIVELOG
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 NTAP1_PDB1                     MOUNTED
             4 NTAP1_PDB2                     MOUNTED
             5 NTAP1_PDB3                     MOUNTED
    
    SQL> alter pluggable database all open;

Where to find additional information

To learn more about the information described in this document, review the following documents and/or websites: