
This time we will review the installation, configuration and backup with scripts (and of course tips) to get Veeam Oracle RMAN Plugin fully functional, since I’m always asked about this solution in different places — it’s a simple, flexible and reliable solution to store RMAN (Recovery Manager) backups. This post focuses only on Oracle RAC on Linux with ASM and database recovery with Veeam Explorer for Oracle. This is a 4-in-1 post.
Introduction#
First of all we need to know something very important: Veeam Oracle RMAN Plugin is a tool that works together with Recovery Manager (RMAN), which is Oracle’s native backup solution and which allows vendor-supported backups to be performed.
With that said, we’re going to briefly explain what Veeam Oracle RMAN Plugin is and what it does, since as we know the backup is performed by RMAN working together with the Plugin.
Of course, there are other ways to back up Oracle databases with Veeam — for example, with Veeam Agent for Linux or with the native Oracle integration for virtualized environments. We’ll cover those in other posts.
What is Veeam Oracle RMAN Plugin?#
This Plugin is an Oracle-certified Veeam solution (Certification Link) to perform backups with RMAN and store them in the Veeam Backup & Replication repository. You can store backups of your Oracle databases running in a Cluster (Oracle RAC), or without a cluster (standalone using ASM), and of course perform recovery through Veeam Explorer for Oracle RMAN.
Technically, what Veeam Oracle RMAN Plugin does is function as an SBT library, configured with RMAN, so that RMAN uses the library to access the Veeam VBR repositories and store the backups with whatever retention policy is used with RMAN.
Installation#
Before installing, you must meet the system requirements and supported versions of Veeam Oracle RMAN Plugin, which you can find at:
https://helpcenter.veeam.com/docs/backup/plugins/system_requirements.html?ver=100
The Oracle RAC I have installed in my lab consists of 2 nodes with the following details:
| Component | Value |
|---|---|
| Operating System | Oracle Linux 7.8 |
| CPU | 8 vCPU |
| RAM | 16 GB |
| OS Disk | 50 GB |
| Oracle iSCSI Disks | 8 x 20 GB (Shared) |
| Oracle Version | 19.3.0.0.0 |
| Oracle Grid Version | 19.0.0.0.0 |
| ASM | Yes |
| Databases | BRAZIL, CHILE, RAC19C |
Table: Oracle RAC Lab 24xSiempre Details
View of the RAC configuration with the command:

Once we’re completely sure we have the supported versions, we need to download or mount the Veeam Backup & Replication ISO to copy the Veeam Oracle RMAN Plugin installation package:

In my case, as of the date of this post, the latest version of Veeam Oracle RMAN Plugin is:
VeeamPluginforOracleRMAN-10.0.1.4854-1.x86_64.rpmWe will use the 64-bit version and the RPM package to install it on all Oracle RAC nodes, which is the recommended way, since RMAN can decide which node to perform the backup on through a feature called RMAN Node Affinity Awareness.
Copy the file to the nodes however you prefer — in my case I’ll do it with WinSCP:

As shown in the image above, I copied as the root user the RPM to both RAC nodes (20.20.20.91 and 20.20.20.92).
Something very important and key for the installation of Veeam Oracle RMAN Plugin is that it must be installed with the “root” user and then configured with the Oracle user, which is generally “oracle”. Use this as a general rule — if you configure with “root” you won’t have access to the Oracle environment variables and will therefore get errors.
Now we’ll install the plugin on both nodes with the following command:
Linux
rpm -ivh VeeamPluginforOracleRMAN-10.0.1.4854-1.x86_64.rpm
Solaris SPARC
pkgadd -d /VeeamPluginforOracleRMAN-10.0.1.4854-1.SPARC.pkgSince my Oracle RAC is on Oracle Linux I’ll use the Linux command. If you have an Oracle RAC on SPARC, you should use the command for that operating system. When running on each node, you’ll get this result:
Node 1:
[root@rac19cn1 ~]# rpm -ivh VeeamPluginforOracleRMAN-10.0.1.4854-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:VeeamPluginforOracleRMAN-10.0.1.4################################# [100%]
Run "OracleRMANConfigTool --wizard" to configure the Veeam Plug-in for Oracle RMAN
[root@rac19cn1 ~]#
Node 2:
[root@rac19cn2 ~]# rpm -ivh VeeamPluginforOracleRMAN-10.0.1.4854-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:VeeamPluginforOracleRMAN-10.0.1.4################################# [100%]
Run "OracleRMANConfigTool --wizard" to configure the Veeam Plug-in for Oracle RMAN
[root@rac19cn2 ~]#And as I explained earlier, for the configuration we will use the Oracle user, which in this case is “oracle”.
Configuration#
Now we must connect via SSH with the “oracle” user, or whichever user belongs to the Oracle installation, to run the Veeam Plugin for Oracle RMAN configuration. Something very important is that the user must have the Oracle environment variables loaded — otherwise, load the profile.
Many times different database administrators (DBAs) prefer to maintain profile files for each Oracle instance, while others configure the variables directly in the default user profile. When performing the configuration, first validate how the profile is loaded and its respective configurations.
As the message indicated when we installed the plugin, we must run the command “OracleRMANConfigTool –wizard” with the oracle user, which will output the following:
[oracle@rac19cn2 ~]$ OracleRMANConfigTool --wizard
Enter backup server name or IP address: veeam24xs.24xsiempre.cl
Enter backup server port [10006]:
Enter username: 24xsiempre\veeam
Enter password for 24xsiempre\veeam:
Veeam repositories:
1. Default Backup Repository
Specify up to 4 Veeam repositories to use as target using whitespace as a separator: 1
Enter the number of data streams (From 1 to 254) to send to each repository concurrently(RMAN DEVICE PARALLELISM value). Channel count per device [1]: 4
Enable Veeam compression? (Y/n): n
Cannot find any Oracle instances.
Please apply the following RMAN settings manually:
CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE;
CONFIGURE CHANNEL DEVICE TYPE SBT_TAPE
PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so'
FORMAT '88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec/RMAN_%I_%d_%T_%U.vab';
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1;
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 4;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F_RMAN_AUTOBACKUP.vab';
Channel definition for RMAN scripts:
ALLOCATE CHANNEL VeeamAgentChannel1 DEVICE TYPE SBT_TAPE
PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so'
FORMAT '88788f9e-d8f5-4eb4-bc4f-9b3f5403bcec/RMAN_%I_%d_%T_%U.vab';
Save configuration?
1. Apply configuration to the Oracle environment
1. Export configuration into a file for manual setup
1. Cancel without saving
Enter:3
*** No Oracle database instances were configured ***As we can see in the log above, there are two highlighted lines, 7 and 12, and we can also see that the Plugin could not be configured.
Regarding line 7, this only shows the repositories that the user has been allowed to access — that is, in the Repository configuration of Veeam Backup & Replication, in the “Access Permissions” section, by default access is always allowed to the Default Backup Repository. The first time we configure the Plugin we’ll always see this repository, for example:

To give access to other Repositories, I recommend setting “Deny to Everyone” on the “Default Backup Repository” or only allowing the users who will access via Veeam Oracle RMAN Plugin. In my case I’ll block access to the Default Repository and allow access to a Scale-Out Backup Repository (SOBR) to store the backups:

Regarding point 12, this is directly related to the Oracle version running in a RAC, since starting with version 12.2.0.1.171017 GI RU/PSU (patch 26737266) and 12.2.0.1.171017 OCW RU/PSU (patch 26729536). MOS Note Doc ID 2329359.1, the way instances are updated in the /etc/oratab file has changed — that is, the mentioned file is no longer updated with the names of instances running in the Oracle RAC.
When Veeam Oracle RMAN Plugin is configured, it reads the /etc/oratab file to detect instance names, but if the instances are not in this file, unfortunately it will not be possible to configure the plugin.
There are two solutions: the first is to manually add the name of each instance running in Oracle RAC (which I don’t like), and the second option is to run a script to read the RAC instances and update the /etc/oratab file. We’ll implement a script here to automate the update of that file.
\\ In Veeam Backup & Replication version 11 this workaround will no longer be needed**
As a recommendation, it should be run on all Oracle RAC nodes (RMAN Node Affinity Awareness):
original="#\n\n\n\n# This file is used by ORACLE utilities. It is created by root.sh\n# and updated by either Database Configuration Assistant while creating\n# a database or ASM Configuration Assistant while creating ASM instance.\n\n# A colon, ':', is used as the field terminator. A new line terminates\n# the entry. Lines beginning with a pound sign, '#', are comments.\n#\n# Entries are of the form:\n# $ORACLE_SID:$ORACLE_HOME:<N|Y>:\n#\n# The first and second fields are the system identifier and home\n# directory of the database respectively. The third field indicates\n# to the dbstart utility that the database should , \"Y\", or should not,\n# \"N\", be brought up at system boot time.\n#\n# Multiple entries with the same $ORACLE_SID are not allowed.\n# \n# \n"
path="/oracle/grid/19.3.0/grid_home/bin/crsctl"
cat /dev/null > /etc/oratab
printf "$original" >> /etc/oratab
for resource in $($path status resource -w "((TYPE = ora.database.type) AND (LAST_SERVER = $(hostname -s)))" | grep ^NAME | sed 's/.*=//'); do
full_resource=$($path status resource -w "((NAME = $resource) AND (LAST_SERVER = $(hostname -s)))" -f)
db_name=$(echo "$full_resource" | grep ^DB_UNIQUE_NAME | awk -F= '{ print $2 }')
ora_home=$(echo "$full_resource" | grep ^ORACLE_HOME= | awk -F= '{ print $2 }')
instance="1" # Change number based on node and instance number
oracle="$db_name$instance:$ora_home:N \n"
printf "$oracle" &>> /etc/oratab
done
# Reconfigure Oracle Plugin
echo=""
no="n" # change to "y" if you need to enable Veeam compression
uno="1" # apply changes
exec >> /home/oracle/veeam.log 2>&1 # log path
OracleRMANConfigTool --wizard <<EOF
$echo
$echo
$echo
$echo
$echo
$echo
$no
$uno
EOFCopy the file to the nodes with the name addoratab.sh and give it execution permissions with chmod +x addoratab.sh. Something key, as seen in line 10, the number must be changed according to the RAC node — for example in node 1 the instance name would be “CHILE1” and in node 2 it would be “CHILE2”. And of course, run the script with sh addoratab.sh or ./addoratab.sh with the “oracle” user. You can observe the updated file with the command cat /etc/oratab.
After configuring the Veeam Backup & Replication repository permissions and updating the /etc/oratab file through the script, we run the plugin wizard again, which will show us the following:
[oracle@rac19cn1 ~]$ OracleRMANConfigTool --wizard
Enter backup server name or IP address: veeam24xs.24xsiempre.cl
Enter backup server port [10006]:
Enter username: 24xsiempre\veeam
Enter password for 24xsiempre\veeam:
Veeam repositories:
1. SOBR
Specify up to 4 Veeam repositories to use as target using whitespace as a separator: 1
Enter the number of data streams (From 1 to 254) to send to each repository concurrently(RMAN DEVICE PARALLELISM value). Channel count per device [1]: 4
Enable Veeam compression? (Y/n): n
RMAN settings will be applied automatically to the following databases:
ORACLE_SID=BRAZIL1 ORACLE_HOME=/oracle/db/19.3.0/db_home
ORACLE_SID=CHILE1 ORACLE_HOME=/oracle/db/19.3.0/db_home
ORACLE_SID=RAC19C1 ORACLE_HOME=/oracle/db/19.3.0/db_home
RMAN settings:
CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE;
CONFIGURE CHANNEL DEVICE TYPE SBT_TAPE
PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so'
FORMAT '60fc82ee-cedc-458f-beda-346323f93c1e/RMAN_%I_%d_%T_%U.vab';
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1;
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 4;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F_RMAN_AUTOBACKUP.vab';
Channel definition for RMAN scripts:
ALLOCATE CHANNEL VeeamAgentChannel1 DEVICE TYPE SBT_TAPE
PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so'
FORMAT '60fc82ee-cedc-458f-beda-346323f93c1e/RMAN_%I_%d_%T_%U.vab';
Save configuration?
1. Apply configuration to the Oracle environment
1. Export configuration into a file for manual setup
1. Cancel without saving
Enter: 1
*** Database instance BRAZIL1 is configured ***
*** Database instance CHILE1 is configured ***
*** Database instance RAC19C1 is configured ***
[oracle@rac19cn1 ~]$As we see, line 7 now only shows the SOBR assigned for the Oracle backups with Veeam Oracle RMAN Plugin, and in lines 13, 14, 15 we can see that it recognizes the RAC instances so RMAN is configured to proceed with the backup.
Something very important: what happens if I later add another instance to the Oracle RAC? Simple — if you don’t add the instance to the /etc/oratab file again, Veeam Oracle RMAN Plugin won’t process it. That’s why here’s a very good solution or tip. The addoratab.sh script is already preconfigured so that when you schedule the daily execution of the addoratab.sh script, it automatically adds the new instance and reconfigures the Veeam Oracle RMAN Plugin without manual intervention.
You just need to schedule it in crontab with the “oracle” user — for example:
[oracle@rac19cn1 ~]$ crontab -e
then add:
0 0 1 ? * * * /home/oracle/addoratab.sh
Close with esc:wq
It runs every day at 1 AMBackup#
To back up the RAC databases, it’s literally up to the consumer — or in this case, up to the DBAs — since generally DBAs maintain their beautiful scripts to back up the databases.
What if I don’t have a Script and need to back up my Oracle RAC? Here I’ll leave a script to back up all the instances running in the Oracle RAC, using the “oracle” user, logging all the commands, searching for errors if any exist, and of course sending email alerts. (You must configure mailx.)
#!/bin/bash
. /home/oracle/.bash_profile # Load Profile and Oracle user environment variables
MAQUINA=`hostname` # Set machine name variable
LOG=/home/oracle/ # Folder to store logs
HORA=`date +%H%M_%d%m%Y` # Hour syntax
FECHA=`date +%d%m%Y` # Date syntax
CORREO=[email protected]
Append=1 # node number where it runs
# Start Script
for ORACLE_SID in $($ORACLE_HOME/bin/srvctl config database) # Loop to extract SID names from file
do
export ORACLE_SID=$ORACLE_SID$Append
LOGFILE=${LOG}/${ORACLE_SID}_${FECHA}_${HORA}.log # Build log filename
exec >> ${LOGFILE} 2>&1 # Write log
# RMAN execution; the client's RMAN script can go here
${ORACLE_HOME}/bin/rman <<EOF
connect target /
run {
backup database plus archivelog;
}
LIST BACKUP SUMMARY;
EOF
echo Database: "${ORACLE_SID}" >> ${LOG}/mail # Write the SID in mail log to send the name
cat ${LOGFILE} >> ${LOG}/mail # Read the log file and insert it into mail
done # End of Loop
grep RMAN-06273 ${LOG}/mail >>/dev/null # Look for RMAN error in case of failure.
if [ $? -eq 0 ] # If not equal to 0, move on; if equal to 0, send alert email
then
ASUNTO='ALERT!: Backup of '${MAQUINA}' has failed' # Alert 1 subject configuration
else
grep -i error ${LOGFILE} >>/dev/null # Look for the word "error"
if [ $? -eq 0 ] # If not equal to 0, move on; if equal to 0, send alert email
then
ASUNTO='ALERT!: Backup of '${MAQUINA}' has failed' # Alert 2 subject configuration
else
ASUNTO='Backup '${MAQUINA}' OK' # If everything is OK, send email with correct subject.
fi
fi
## Mail ##
cat ${LOG}/mail | /usr/bin/mailx -s "${ASUNTO}" "${CORREO}" # Read the Mail file to send as email body.
rm -rf ${LOG}/mail # Remove used log
echo $exit 0On lines 17 to 21, where the RMAN instructions for the backup go, you can edit the script however you want — just don’t forget to change the email and some of the parameters visible, like the node number where it runs. This script performs a full backup of the databases including the ArchiveLogs.
For the more detail-oriented: the script loops over the instances via a “for” using the command srvctl config database, appends the node number to the instance, enters RMAN and runs the backup. When it finishes with one instance, it continues backing up the next one until it finishes all of them.
When running the backup script, you will get the following:

You’ll be able to see the RMAN execution logs for each of the instances, and if you have mailx configured you’ll receive the successful backup notification. In addition, you’ll be able to see the successful backup in Veeam Backup & Replication:

With this we already have our Oracle RAC instance backups running easily — for example, if you want to schedule the backup, just add the backup.sh script to crontab on the days you see fit and edit the RMAN part to perform the backup as needed, or run it with your preferred scheduler or with Veeam Agent for Linux if you have it installed and are backing up some files.
Recovery#
Now that we have backups, they will appear in the Veeam Backup & Replication console menu, after Backup in Disks:

And we can select the backup to restore it in case of any problem:

And we can see Veeam Explorer for Oracle RMAN:

Select the database to recover and configure the requirements:

As always, it’s important to read specific information from the Veeam manual:
https:// helpcenter.veeam.com /docs/ backup /explorers/veor_considerations.html?ver=100
You can also restore directly from RMAN with its respective commands.
Logs#
The log files — in case of installation or configuration problems — are in the path: /tmp/veeam\_plugin\_logs, where you can look for errors or send them to Veeam support in case of any problem, as well as the logs generated by the addoratab.sh and backup.sh scripts, which are stored in /home/oracle/.
With that last part we wrap up this first blog post :) What do you think for the first one? Leave your comments or rate it.
