Oracle Database Cloud Backup Module for Azure
Use the Oracle Database Cloud Backup Module for Azure to backup your Oracle Databases to Microsoft Azure Cloud Storage using RMAN.
About Oracle Database Cloud Backup Module for Azure
You can use RMAN to backup Oracle Database 19c Release Update version 28 (19.28) or higher version to Azure Blob Storage containers.
The RMAN SBT library for Azure enables RMAN to communicate with the Oracle Database Cloud Backup Module to perform backup and recovery tasks with Azure Storage. Backups are directly stored in Azure blob containers.
Before creating backups to Azure, you must create an Azure Storage account and obtain the storage account credentials required for authentication. Next, set up the Oracle Database Cloud Backup Module for Azure on the target Oracle Database server. Finally, you must configure an RMAN SBT channel using the RMAN SBT library for Azure. This creates a persistent RMAN configuration for all backups and restores with Azure storage containers.
Note: The Oracle Database Cloud Backup Module for Azure is compatible with Oracle Databases deployed on-premises or on Azure virtual machines. Backups to Azure Blob Storage for Oracle Database Cloud Services are not available.
Sign-up for a Microsoft Azure Blob Storage Account
To backup your Oracle Database to Microsoft Azure, you need an existing Microsoft Azure Blob Storage account.
Create a Microsoft Azure Storage account. See Create an Azure storage account.
Ensure to obtain these credentials associated with your Azure Storage account. These values are mandatory to set up the Oracle Database Cloud Backup Module for Azure.
-
storageaccount- Azure Blob Storage Account Name -
sharedkey- Azure Blog Storage Account Key -
container- Azure Blob Container Name
Set Up the Oracle Database Cloud Backup Module for Azure
Before you backup to Azure, you must set up the Oracle Database Cloud Backup Module for Azure on the target Oracle Database server.
The backup module setup tool az_setup.zip is available in the Oracle home directory after you install the Oracle Database.
Table 32-1 File Name and Location of the Oracle Database Cloud Backup Module for Azure Setup Tool
| Oracle Database Cloud Backup Module for Azure Setup Tool | Location on UNIX and Linux Systems | Location on Windows Systems |
|---|---|---|
az_setup.zip |
$ORACLE_HOME/lib |
%ORACLE_HOME%\lib |
Prerequisites for the Oracle Database Cloud Backup Module for Azure
Verify these minimum requirements before you set up the Oracle Database Cloud Backup Module for Azure.
Table 32-2 Minimum System Requirements for the Oracle Database Cloud Backup Module for Azure
| System | Supported Versions |
|---|---|
| Oracle Database |
|
| Java SE Development Kit (JDK) | Default JDK version supported by the target Oracle Database release. |
Parameters for Running the Oracle Database Cloud Backup Module for Azure Setup Tool
Review the mandatory parameters and compile their values before you set up the Oracle Database Cloud Backup Module for Azure.
After you install Oracle Database, the backup module setup tool az_setup.zip is available in the Oracle home directory (see Table 32-1).
Extract the az_setup.zip setup tool to a subdirectory of your choice. To preview the parameters, run this command from the subdirectory that contains the extracted setup files.
$ java -jar az_setup.jar
Example 32-1 Extracting the Oracle Database Cloud Backup Module for Azure Setup Files and Previewing the Parameters (on UNIX and Linux systems)
In this example, extract the contents of the az_setup.zip file to the azmodule subdirectory.
$ mkdir -p $ORACLE_HOME/lib/azmodule
$ cd $ORACLE_HOME/lib/azmodule
unzip -q $ORACLE_HOME/lib/az_setup.zip
To preview the parameters, run this command from the azmodule subdirectory that contains the extracted setup files.
$ java -jar az_setup.jar
Table 32-3 Parameters to Set Up the Oracle Database Cloud Backup Module for Azure
| Parameter | Description | Required or Optional |
|---|---|---|
-storageaccount |
The account name for your Microsoft Azure Blob Storage account used for RMAN backups. | Required |
-sharedkey |
The access key for the specified Microsoft Azure -storageaccount. |
Required |
-container |
A custom container associated with the specified Azure When you backup to Azure, RMAN stores the backups in the specified container. The setup tool will create the specified container, if it does not exist. Skip the
|
|
-immutable-container |
A WORM compliant (immutable) Azure storage container to store RMAN backups. See Microsoft Azure Immutable Storage for more information. |
Optional |
-temp-metadata-container |
A container used to store temporary metadata during RMAN backup and recovery operations. | Required if you have specified a -immutable-container. |
-walletDir |
Directory that contains the Azure storage account credentials required to authenticate RMAN operations. Create the wallet directory before you run the setup tool. If you skip this parameter, then the setup tool prompts you to enter the wallet directory. |
Required |
-updateWalletNoValidate |
Updates the wallet without verifying the target host connection. If you have changed the Microsoft Azure Blob Storage account credentials and want to update the existing wallet, then rerun the installer by specifying the In this example, you run the installer with the
|
Optional |
-trustedCerts |
List of SSL certificates that needs to be imported into the Oracle wallet. | Required - If you want to manually add a list of SSL certificates to the wallet. Optional - If you want the setup tool to retrieve the required SSL certificates. |
-configFile |
Specifies a custom name and location for the Azure backup module configuration file created by the setup tool. For example, Skip the
The default name for the configuration file is |
Optional |
-proxyHost |
HTTP proxy server host name | Optional |
-proxyPort |
HTTP proxy server port number | Optional |
-proxyId |
HTTP proxy server user name, if needed. | Optional |
-proxyPass |
HTTP proxy server password, if needed. | Optional |
-argFile |
A plain text file which contains the input parameters for the Azure Backup Module setup tool. Specify For example, assume that the
This example shows that you can set up the backup module using the parameters specified in the
|
Optional |
-import-all-trustcerts |
Imports all X509 certificates from Java truststore. This is the default behaviour. |
Optional |
-import-current-trustcert-only |
Import current X509 certificate from Java truststore. |
Optional |
Run the Setup for the Backup Module for Azure
Use these steps to set up the Oracle Database Cloud Backup Module for Azure on the target database server.
Before you begin, ensure to verify the prerequisites and compile the mandatory parameter values.
-
Prerequisites for the Oracle Database Cloud Backup Module for Azure
-
Parameters for Running the Oracle Database Cloud Backup Module for Azure Setup Tool
-
The Oracle Database Cloud Backup Module for Azure setup tool
az_setup.zipis available in the Oracle home directory (see Table 32-1).Extract the
az_setup.zipfile to a subdirectory of your choice. In this example, you extract the setup files to theazmodulesubdirectory.$ mkdir -p $ORACLE_HOME/lib/azmodule $ cd $ORACLE_HOME/lib/azmodule unzip -q $ORACLE_HOME/lib/az_setup.zip -
On the target database server, go to the directory where you have extracted the Azure Backup Module setup files.
In this example, you go to the
azmodulesubdirectory which contains theaz_setup.jarfile and the README fileaz_readme.txt.$ cd $ORACLE_HOME/lib/azmodule -
Run the setup tool
az_setup.jar. Specify the parameters and values as shown in this example.java -jar az_setup.jar -storageaccount rmanDBbackup -sharedkey aaaaaaaasd754pijuwheaq67t7tninefkn -container RMANbackupContainer -proxyHost www-proxy.example.com -walletDir oracle/dbs/az_wallet -proxyPort 80
The Oracle Database Cloud Backup Module for Azure setup tool creates these files:
-
Configuration file
az<ORACLE_SID>.ora, where<ORACLE_SID>is the system identifier of the Oracle Database that is being backed up to Azure storage.By default, the configuration file is located in the
$ORACLE_HOME/dbsdirectory onUNIXand Linux systems. On Windows systems, the default location of the configuration file is%ORACLE_HOME%\database. -
Oracle wallet file, that securely stores the Microsoft Azure Storage account credentials. RMAN requires the wallet file for authentication during backup and restore operations with Azure blob containers..
-
Review the output.
This example shows a sample run of the setup tool. The setup tool creates the wallet file
az_walletand the configuration file.azsbt.ora.Oracle Database Cloud Backup Module Setup Tool, build 23.8.0.25.04 Oracle Database Cloud Backup Module credentials are valid. Backups would be sent to container RMANbackupContainer. Oracle Database Cloud Backup Module wallet created in directory /oracle/dbs/az_wallet. Oracle Database Cloud Backup Module initialization file /oracle/dbs/azsbt.ora created.
Configuration Parameters Created by the Oracle Database Cloud Backup Module for Azure
The setup tool creates the configuration file with parameter values required for RMAN operations with the Oracle Database Cloud Backup Module for Azure.
You can optionally modify the parameter values in the configuration file.
Table 32-4 Configuration Parameters To Specify Settings for the Oracle Database Cloud Backup Module for Azure
| Parameter Name | Mandatory? | Description |
|---|---|---|
AZ_HOST |
Yes | Specifies the name of the host to which the RMAN backups are sent. |
AZ_PROXY |
No | Specifies the proxy server and port when the target database is behind a firewall. It is specified in the <host>:<port> format. |
AZ_CONTAINER |
No | Specifies the Azure Blob Storage container in which RMAN stores the database backups. If this parameter is not specified, then the SBT library first attempts to find an existing bucket in the specified location and named in the format oracle-data-account name-. If no such bucket exists, then the SBT library creates a unique bucket with the oracle-data-account name- prefix. |
AZ_TEMP_CONTAINER |
No | Name of the Azure Blob Storage container that stores the temporary files associated with immutable backups. The backup module requires the temporary container for backup operations. Create a separate container to store the temporary files. Run the setup tool by specifying the container name in the -temp-metadata-container value in the az.ORACLE_SID.ora configuration file after you run the setup tool. |
AZ_CHUNK_SIZE |
No | Specifies the object size, in bytes, that will used when storing backups to Azure Blob Storage. The default chunk size is 100MB. |
AZ_WALLET |
Yes | Defines the wallet location, alias, and proxy authentication alias through which the SBT library reads the Azure account credentials. The format of this parameter is:
|
Configuring SBT Channel for Azure Storage
Configure an automatic SBT channel so that RMAN can directly send backups to Azure Blob Storage containers.
-
Start RMAN and connect to the target database.
-
Use the
CONFIGUREcommand to preconfigure an automaticsbtchannel. Specify theoracle.azureSBT_LIBRARYalias of the Oracle-supplied native SBT library for RMAN operations with Microsoft Azure. You can optionally specify the native SBT library path instead of the library alias.RMAN> CONFIGURE DEFAULT DEVICE TYPE sbt; CONFIGURE CHANNEL DEVICE TYPE 'SBT' PARMS 'SBT_LIBRARY=oracle.azure, ENV=(AZ_PFILE=myfiles/az<ORACLE_SID>.ora)';You can optionally specify the native SBT library path instead of the library alias, as shown below.
RMAN> CONFIGURE DEFAULT DEVICE TYPE sbt; CONFIGURE CHANNEL DEVICE TYPE 'SBT' PARMS 'SBT_LIBRARY=$ORACLE_HOME/lib/libaz.so, SBT_PARMS=(AZ_PFILE=myfiles/az<ORACLE_SID>.ora)';RMAN> CONFIGURE DEFAULT DEVICE TYPE sbt; CONFIGURE CHANNEL DEVICE TYPE 'SBT' PARMS 'SBT_LIBRARY=oracle.azure, ENV=(AZ_PFILE=C:\myfiles\az<ORACLE_SID>.ora)';You can optionally specify the native SBT library path instead of the library alias, as shown below.
RMAN> CONFIGURE DEFAULT DEVICE TYPE sbt; CONFIGURE CHANNEL DEVICE TYPE 'SBT' PARMS 'SBT_LIBRARY=%ORACLE_HOME%\bin\oraaz.dll, SBT_PARMS=(AZ_PFILE=C:\myfiles\az<ORACLE_SID>.ora)';This example configures an automatic channel to send all RMAN backups to tape by default. The
SBT_LIBRARYparameter specifies the Azure Backup Module libraryoracle.azurethat enables RMAN backups to Azure Blob Storage containers. TheENVparameter (UNIX and Linux) or theSBT_PARMSparameter (Windows) specifies the Azure Backup Module configuration fileazORACLE_SID.orawhich provides the parameters required for RMAN jobs.ORACLE_SIDis the system identifier of the target Oracle Database being backed up to Microsoft Azure Blob Storage.Note:
- On Windows systems, use the
SBT_PARMSparameter instead of theENVparameter to specify the configuration file. - You can skip the
ENVorSBT_PARMSparameter if the configuration file is created in the default directory chosen by the backup module setup tool. - An automatic SBT channel creates a persistent default SBT device setting that applies to all backup and recovery operations. Alternatively, you can use the
ALLOCATE CHANNELcommand to manually allocate a one-time SBT channel before each backup or restore operation.
- On Windows systems, use the
-
Use the
SHOWcommand to review the RMAN configuration and to confirm that you have set Azure as the backup destination.In this example, you run the
SHOW ALL CHANGEDcommand to view the RMAN configuration changes for thesalesdatabase.RMAN> SHOW ALL CHANGED; show all changed; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name sales are: CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE'; CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET; CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/oracle/lib/libaz.so, ENV=(AZ_PFILE=/myfiles/azsbt.ora)';
Backup and Restore with Azure Storage Using RMAN
After you set up the Oracle Database Backup Module for Azure and configure a corresponding SBT channel, use this procedure to directly backup and restore with Azure blob storage.
-
Start RMAN and connect to the target database.
-
Run the
SHOW ALL CHANGEDcommand to verify that the RMAN environment is configured for backups with Azure Blob Storage.RMAN> SHOW ALL CHANGED;This sample configuration indicates that the
SBT_TAPEchannel is configured to use theoracle.azureSBT library. The default device type is set to'SBT_TAPE'which indicates that Azure Storage is the default backup destination.show all changed; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name sales are: CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE'; CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET; CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=oracle.azure'; -
Run the
BACKUP DATABASEcommand (see the sample output).BACKUP DATABASE;backup database; Starting backup at 06-FEB-25 allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: SID=61 device type=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Database Azure Backup Service Library VER 23.8. allocated channel: ORA_SBT_TAPE_2 channel ORA_SBT_TAPE_2: SID=204 device type=SBT_TAPE channel ORA_SBT_TAPE_2: Oracle Database Azure Backup Service Library VER 23.8 allocated channel: ORA_SBT_TAPE_3 channel ORA_SBT_TAPE_3: SID=193 device type=SBT_TAPE channel ORA_SBT_TAPE_3: Oracle Database Azure Backup Service Library VER 23.8 channel ORA_SBT_TAPE_1: starting full datafile backup set -
Run the
RESTOREandRECOVERcommands to recover the target database using backups stored in Azure Storage.RESTORE DATABASE; RECOVER DATABASE;