Skip to main content
Druva Documentation

Configure the Phoenix Backup Store and RMAN hosts to backup databases

    

Phoenix Editions: File:/tick.png Business File:/cross.png Enterprise File:/tick.png Elite

After the Phoenix Backup Store is created, a mount must be created on the Phoenix Backup Store which serves as the location where Oracle Recovery Manager (RMAN) stores the database backups. Phoenix then creates a snapshot of the Oracle RMAN backup on the Phoenix Backup Store and uploads it to the Phoenix Cloud. 

The Phoenix Backup Store configuration includes the following steps:

  • Create a backup mount on the registered Phoenix Backup Store
  • Map the backup mount on the RMAN host
  • Let RMAN store backups on the mount

To backup databases:

Prerequisite

The Phoenix Backup Store is deployed and activated. For more information, see Deploy and register a Phoenix Backup Store.

Create a mount on the Phoenix Backup Store

To create a mount on the registered Phoenix Backup Store:

  1. Log in to the Phoenix Management Console.
  2. From the top menu, select the Organization where you want to configure the Phoenix Backup Store.
    The Organization page appears. 
  3. On the Organization page, click Protect > Oracle on the top-menu. 
    The Oracle page appears. 
    backup_mount_oracle.png
  4. On the Oracle page, under the Phoenix Backup Stores tab, select a Phoenix Backup Store and then click Create Backup Mount.
    The Create Backup Mount wizard appears.
  5. In the Assign Administrative Group section of the wizard, select an existing administrative group or create a new one and click Next: Create Backup Mount. You see this section when you create a backup mount for the first time.
  6. In the Backup Mount Details tab of the wizard, provide:
    Field Description
    Backup Mount Name The backup mount name is the RMAN target location. The Backup Mount Name field identifies the Phoenix Backup Store mount where the Oracle RMAN backups are stored.  For example, testmount. Ensure that you enter alphanumeric characters only. 
    Storage The storage is the location on the Phoenix Cloud where the snapshot is stored after the Phoenix Backup Store uploads the snapshot to the Phoenix Cloud. 
    IP Whitelist The list of IP addresses of the Oracle RMAN hosts that can store Oracle RMAN backups on the mount.

    To allow multiple IP addresses, either use a comma or a wildcard. For example, if you enter 192.0.*.*, all the servers with the IP addresses starting 192.0.0.0 through 192.0.255.255 can access the mount. If you want to allow servers with specific IP addresses to access the mount, enter the IP addresses using a comma. For example, you want two servers with IP addresses 192.0.2.0 and 198.51.100.1 to access the mount. To allow access to the mount, enter 192.0.2.0, 198.51.100.1. 

    If no IP address is provided, any system can connect to the Phoenix Backup Store.
    Max Bandwidth Bandwidth available to the Phoenix Backup Store to upload the snapshots to the Phoenix Cloud. 
    After you provide all the details, click Next.
  7. In the Retention tab of the wizard, provide:

    Field  Description
    All Snapshots for <the number of> Days Phoenix retains all the snapshots that are created for the number of days specified in Daily snapshots.
    Weekly revisions for <the number of> Weeks Number of weekly snapshots that Phoenix should retain. Phoenix treats the latest snapshot in the week as the weekly snapshot.
    Monthly revisions for <the number of> Months Number of monthly snapshots that Phoenix should retain. Phoenix treats the latest snapshot in the month as the monthly snapshot.
    Yearly revisions for <the number of> Years Number of yearly snapshots that Phoenix should retain. Phoenix treats the latest snapshot in the year as the yearly snapshot.
    After you provide the retention settings, click Finish.

Phoenix creates a mount on the Phoenix Backup Store, and you can see it listed in the Backup Mounts tab of the Oracle page.

About the scripts on the Phoenix Backup Store

Druva provides scripts that are shipped with the Phoenix Backup Store. Use these scripts to configure the Phoenix Backup Store for backup and restore of Oracle databases. After you deploy the Phoenix Backup Store:

For Linux RMAN hosts:

  1. Log on to the Ubuntu server or the virtual machine that is set up as the Phoenix Backup Store.
  2. Transfer the following scripts from the Phoenix Backup Store to the server that hosts Oracle Recovery Manager (RMAN). The scripts are stored under the /opt/Druva/Phoenix/PhoenixBackupStore/bin folder on the Phoenix Backup Store.
    • phoenix_get_mount_details.sh:This script provides the details of the backup mount and the Phoenix Backup Store. Use this script to get the location of the backup mount so that you can map it to the RMAN host. 
    • oracle_rman_backup.sh:This script runs the RMAN commands that back up a database, create an Oracle RMAN backup and store it on the backup mount. You can modify this script to provide RMAN parameters that specify the type of backup and information related to backup like filesperset and channels for a backup. 

For Windows RMAN hosts, Druva provides a template batch file and an RMAN script to backup databases. The files are:

  • oracle_rman_backup.bat: This batch file runs the RMAN script that backs up a database. You can modify this script to provide RMAN parameters that specify the type of backup and information related to backup like filesperset and channels for a backup. 
  • rman_backup_windows.rman: This script runs the backup job on RMAN.

Note: The contents of the files for Windows RMAN hosts are available in this reference article. You can copy the contents of the files and create your own scripts to backup databases.

Backup Oracle databases using RMAN hosted on a Linux server

After you create a mount on the Phoenix Backup Store, you have to map it to the Linux server that hosts the RMAN. To map the mount to the RMAN host, you need the details of the backup mount which is a shared directory on the Phoenix Backup Store. Druva provides RMAN scripts that use the Phoenix Backup Store API to backup databases. For more information on how this script uses the Phoenix Backup Store API to backup and store Oracle RMAN backups on the backup mount, see Phoenix Backup Store API reference. To review the contents of the scripts, see Template shell scripts for Linux RMAN hosts.

In this example, the backup mount on the Phoenix Backup Store is mapped to the /local/testmount folder on the RMAN host. 

  1. After you transfer the scripts to the server that hosts the RMAN, run the phoenix_get_mount_details.sh script on the RMAN host with the IP address of the Phoenix Backup Store server and backup mount name as the parameters.

    Run the script as:

    ./phoenix_get_mount_details.sh <Phoenix-Backup-Store-ip-address> <backup-mount-name>
    For example:
    ./phoenix_get_mount_details.sh 192.0.2.1 testmount

    The output of the phoenix_get_mount_details.sh script is the path to the backup mount. You have to map the backup mount to the RMAN host so that when you run a backup job using the RMAN script, the RMAN can store the Oracle RMAN backup on the backup mount.

    Sample output of the RMAN script:

    Remote mountpath is 192.0.2.1:/Phoenix/testmount/oracle_data
    Mount options : retrans:5,timeo:1200, rw, user
    

    If you are using a Real Application Cluster (RAC) setup, the nfs mount should have NOAC option.

  2. Map the backup mount to the RMAN host after you generate its path. For example, if the RMAN host is  also Linux based,
    Run the following command for a standalone host: 
    sudo mount -t nfs <Phoenix-Backup-Store-IP-Address>:<path-to-backup-mount-on-Phoenix-Backup-Store> <path-to-local-folder-on-rman-host-for-mapping>

    For example:

    sudo mount -t nfs 192.0.2.1:/Phoenix/testmount/oracle_data /local/testmount

    Example command for a Real Application Cluster setup

    sudo mount -t -o noac,rw,user nfs 192.0.2.1:/Phoenix/testmount/oracle_data /local/testmount

    For more information on the mount command, see Ubuntu Manpage: mount [External link to Ubuntu Manpages].

  3. Add the folder as an entry to /etc/fstab to ensure that the backup mount stays mapped to the RMAN host if it is restarted.  For example:
    192.0.2.1:/Phoenix/testmount/oracle_data /local/testmount nfs rw,user,timeo=1200,noac
    • 192.0.2.1 is an example IP address of the Phoenix Backup Store.
    • /Phoenix/testmount/oracle_data is an example path to the backup mount on the Phoenix Backup Store.
    • /local/testmount is an example path to a folder on the RMAN host to which the backup mount is mapped. When RMAN writes data to this folder, data is actually written to the backup mount through NFS.
    • rw,user,timeo=1200,noac are applicable mount options. For more information, see Fstab [External link to Ubuntu documentation].
  4. Change the ownership of the mapped folder on the RMAN host. The ownership of the mount on the RMAN host should belong to the oracle/oinstall user.  Run the following command as the root user to change the ownership of the folder:
    sudo chown -R oracle:oinstall <path-to-local-folder-on-rman-host-to-which-backup-mount-is-mapped>

    For example:

    sudo chown -R oracle:oinstall /local/testmount

    or

    sudo chmod -R 777 /local/testmount
  5. After you map the backup mount to the RMAN host, you can backup Oracle databases. 

You can use the oracle_rman_backup.sh script on the RMAN host to run a backup job. The oracle_rman_backup.sh is a template script, and you can modify the script to change the  RMAN configuration parameters and to customize the data that you want to backup. Before you run the script, ensure that:

  • You have transferred the oracle_rman_backup.sh script to the RMAN host
  • You have the IP address of the Phoenix Backup Store that hosts the backup mount
  • You have the backup mount name

The run-time parameters of the oracle_rman_backup.sh script are: 

  • A folder path that will store the logs that the RMAN generates
  • IP address of the Phoenix Backup Store that hosts the backup mount
  • The name of the backup mount

To run the script:

  1. Open the terminal. 
  2. On the terminal, change directory to the folder in which the script is stored. 
  3. Run the script as the Oracle user.
    ./oracle_rman_backup.sh <path-to-a-folder-on-rman-host-to-store-rman-logs> <ip-address-of-the-phoenix-backup-store> <name-of-the-backup-mount>
    For example:
    ./oracle_rman_backup.sh /home/test-usr/rman-log-directory 192.0.2.1 testmount

When the script is run, the RMAN creates an Oracle RMAN backup and stores it on the backup mount of the Phoenix Backup Store. All the logs of the Oracle RMAN backup job are stored in the folder you provide at the time of running the script. 

Backup Oracle databases using RMAN hosted on a Windows server

After you create a backup mount on the Phoenix Backup Store, you have to prepare the Windows server that hosts RMAN.  Druva provides RMAN script and a template batch file that use the Phoenix Backup Store API to backup databases. For more information on how this batch file uses the Phoenix Backup Store API to backup and store Oracle RMAN backups on the backup mount, see Phoenix Backup Store API reference. To review the contents of the scripts, see Template batch file and RMAN script for Windows RMAN hosts.  To prepare the Windows host for backup:

  1. On the Windows Server, install the Network File System [External link to Microsoft documentation]
  2. Enable Direct NFS Client for Oracle. The Direct NFS Client for Oracle optimizes the operations that RMAN performs to store backups on the Phoenix Backup Store mount. For more information, see Enabling Direct NFS Client [External link to Oracle documentation]
  3. Enable write permissions for the anonymous user on the Windows Server. With the write permissions, the anonymous user can write data on the backup mount of the Phoenix Backup Store.  To enable write permissions for the anonymous user:
    1. Run regedit to start the Registry Editor. 
    2. In the Registry Editor, navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default folder in the left pane. 
    3. Create two DWORD 32-bit values in the folder. The two values create a user and group ID for the anonymous user that can write to the backup mount on the Phoenix Backup Store. To create the values:
      • In the right-pane, right-click and then select New > DWORD 32-bit value. Specify the name as AnonymousGID. Ensure that:
        • The value is either 0 or it matches the GID of the root user on the Phoenix Backup Store
        • Base is decimal
      • In the right-pane, right-click and then select New > DWORD 32-bit value again. Specify the name as AnonymousUID. Ensure that:
        • The value is either 0 or it matches the UID of the root user on the Phoenix Backup Store
        • Base is decimal
    4. Close the Registry Editor and restart the Windows Server. 
  4. Set up the curl utility on the Windows Server. For more information, see How do I set up and use cURL on Windows?

After the Windows Server is ready, you can use the oracle_rman_backup.bat and oracle_windows.rman scripts on the RMAN host to run a backup job. The oracle_rman_backup.bat is a template batch file, and you can modify it to change the  RMAN configuration parameters and to customize the data that you want to backup. Before you run the batch file, ensure that:

  • You have transferred the oracle_rman_backup.bat and oracle_windows.rman scripts to the Windows RMAN host
  • Installed the NFS Windows client through server roles
  • Direct NFS Client for Oracle is enabled
  • You have the IP address of the Phoenix Backup Store that hosts the backup mount
  • You have the backup mount name

The run-time parameters of the oracle_rman_backup.bat script are: 

  • A folder path that will store the logs that the RMAN generates
  • IP address of the Phoenix Backup Store that hosts the backup mount
  • The name of the backup mount

To run the batch file:

  1. Open the command prompt as admin on the Windows Server. 
  2. In the command prompt, change directory to the folder in which the batch file is stored. 
  3. Run the batch file. For example:
    oracle_rman_backup.bat C:\local\rman-logs-directory 192.0.2.1 testmount