I recently had to install and configure the Veeam RMAN plug-in on an ODA, and would like to provide the steps in this article, as it might be helpful for many other people.
Read more: Installing and configuring Veeam RMAN plug-in on an ODA
Create Veeam linux OS user
We will create an OS linux user on the ODA that will be used to authenticate on the Veeam Backup server. This user on the sever will need to have the Veeam Backup Administrator role or Veeam Backup Operator and Veeam Restore Operator roles.
Check if role for user and group is not already used:
[root@ODA02 ~]# grep 497 /etc/group [root@ODA02 ~]# grep 54323 /etc/passwd
Create the group:
[root@ODA02 ~]# groupadd -g 497 veeam
Create the user:
[root@ODA02 ~]# useradd -g 497 -u 54323 -d /home/veeam -s /bin/bash oda_veeam [root@ODA02 ~]# passwd oda_veeam Changing password for user oda_veeam. New password: Retype new password: passwd: all authentication tokens updated successfully.
Installing Veeam RMAN plug-in
As we know, we might need to be careful installing new packages on an ODA, and we might need to remove them during patching in case of issue. We could easily here install the plug-in with a rpm, knowing no dependencies are needed, but I decided to even be less transparent installing the plugin with the tar file.
I installed the agent with the root user.
The downloaded tar file:
[root@ODA02 ~]# ls -ltrh Veeam*.tar* -rw-r--r-- 1 root root 62M Oct 31 15:08 VeeamPluginforOracleRMAN.tar.gz
I created the directory for the installation:
[root@ODA02 ~]# mkdir /opt/veeam
And uncompressed it in the newly created directory:
[root@ODA02 ~]# tar -xzvf VeeamPluginforOracleRMAN.tar.gz -C /opt/veeam VeeamPluginforOracleRMAN/ VeeamPluginforOracleRMAN/oracleproxy VeeamPluginforOracleRMAN/RMANPluginManager VeeamPluginforOracleRMAN/OracleRMANConfigTool VeeamPluginforOracleRMAN/3rdPartyNotices.txt VeeamPluginforOracleRMAN/libOracleRMANPlugin.so VeeamPluginforOracleRMAN/veeamagent
I checked the files:
[root@ODA02 ~]# ls -ltrh /opt/veeam/ total 4.0K drwxr-xr-x 2 grid 1000 4.0K Aug 24 04:10 VeeamPluginforOracleRMAN [root@ODA02 ~]# cd /opt/veeam/VeeamPluginforOracleRMAN/ [root@ODA02 VeeamPluginforOracleRMAN]# ls -ltrh total 167M -rwxr-xr-x 1 grid 1000 81M Aug 24 04:10 veeamagent -rwxr-xr-x 1 grid 1000 37M Aug 24 04:10 RMANPluginManager -rwxr-xr-x 1 grid 1000 35M Aug 24 04:10 OracleRMANConfigTool -rwxr-xr-x 1 grid 1000 6.7M Aug 24 04:10 oracleproxy -rwxr-xr-x 1 grid 1000 7.0M Aug 24 04:10 libOracleRMANPlugin.so -r--r--r-- 1 grid 1000 65K Aug 24 04:10 3rdPartyNotices.txt
And changed the ownership to root:
[root@ODA02 veeam]# pwd /opt/veeam [root@ODA02 veeam]# ls -l total 4 drwxr-xr-x 2 grid 1000 4096 Aug 24 04:10 VeeamPluginforOracleRMAN [root@ODA02 veeam]# chown -R root: VeeamPluginforOracleRMAN/ [root@ODA02 veeam]# ls -l total 4 drwxr-xr-x 2 root root 4096 Aug 24 04:10 VeeamPluginforOracleRMAN [root@ODA02 veeam]# ls -l VeeamPluginforOracleRMAN/ total 170052 -r--r--r-- 1 root root 65542 Aug 24 04:10 3rdPartyNotices.txt -rwxr-xr-x 1 root root 7251448 Aug 24 04:10 libOracleRMANPlugin.so -rwxr-xr-x 1 root root 6968560 Aug 24 04:10 oracleproxy -rwxr-xr-x 1 root root 36475936 Aug 24 04:10 OracleRMANConfigTool -rwxr-xr-x 1 root root 38515744 Aug 24 04:10 RMANPluginManager -rwxr-xr-x 1 root root 84837408 Aug 24 04:10 veeamagent
I gave writable permissions to other group, so oracle linux user can write in the directory:
[root@ODA02 veeam]# pwd /opt/veeam [root@ODA02 veeam]# chmod o+w VeeamPluginforOracleRMAN/ [root@ODA02 veeam]# ls -l total 4 drwxr-xrwx 2 root root 4096 Aug 24 04:10 VeeamPluginforOracleRMAN
Configure Veeam RMAN plug-in
With oracle linux, we now need to configure the plugin. The information like the backup repositories name, will come from the Veeam Backup server side. We are running SE2 databases, so there will be no parallelism. The installation script will not ask for any number of channels.
The following information that can be requested:
- DNS name or IP address of the Veeam Backup & Replication server
- port which will be used to communicate with the Veeam Backup & Replication server. Default port is 10006
- OS user credentials to authenticate against the Veeam Backup & Replication server
- The backup repository to be selected from a list of available one. For duplexing functionality you can select up to 4 repositories.
- The number of channel for parallelism backup. In our case, as we use SE2 database, this options will not be requested.
- Compression or no compression
- Authentication method between OS or database one. We will use OS authentication. We will use oracle linux user as it is part of DBA group (mandatory)
Running the configuration command:
[oracle@ODA02 VeeamPluginforOracleRMAN]$ ./OracleRMANConfigTool --wizard Enter backup server name or IP address: X.X.X.41 Enter backup server port number [10006]: Enter username: oda_veeam Enter password for oda_veeam: Available backup repositories: 1. Select Veeam repository from the list by typing the repository number: 1 RMAN parallelism is not supported in Oracle Standard Edition. Do you want to use Veeam compression? (Y/n): Y Select the Oracle environment authentication method: 1. Operating system authentication 2. Database authentication Enter [1]: The current user is restricted and cannot read required OS information. Please re-run the following command with root rights: OracleRMANConfigTool --set-credentials RMAN settings: CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE; CONFIGURE CHANNEL DEVICE TYPE SBT_TAPE PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so' FORMAT 'e718bc55-0c60-43bc-b1f7-f8cf2c793120/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 1; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F_RMAN_AUTOBACKUP.vab'; RMAN settings will be applied automatically to the following databases: ORACLE_SID=INST1 ORACLE_HOME=/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 ORACLE_SID=INST2 ORACLE_HOME=/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 ORACLE_SID=INST3 ORACLE_HOME=/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 ORACLE_SID=INST4 ORACLE_HOME=/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_1 ORACLE_SID=INST5 ORACLE_HOME=/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 ORACLE_SID=INST6 ORACLE_HOME=/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2 Channel definition for RMAN scripts: ALLOCATE CHANNEL VeeamAgentChannel1 DEVICE TYPE SBT_TAPE PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so' FORMAT 'e718bc55-0c60-43bc-b1f7-f8cf2c793120/RMAN_%I_%d_%T_%U.vab'; Save configuration? 1. Apply configuration to the Oracle environment 2. Export configuration into a file for manual setup 3. Cancel without saving Enter: 1 *** Database instance INST1 is configured *** *** Database instance INST2 is configured *** *** Database instance INST3 is configured *** *** Database instance INST4 is configured *** *** Database instance INST5 is configured *** *** Database instance INST6 is configured ***
As root, we now need to run the following command to specify credentials to connect to the Veeam Backup Server, knowing current oracle linux user is restricted.
[root@ODA02 VeeamPluginforOracleRMAN]# pwd /opt/veeam/VeeamPluginforOracleRMAN [root@ODA02 VeeamPluginforOracleRMAN]# ./OracleRMANConfigTool --set-credentials 'oda_veeam' '***********' [root@ODA02 VeeamPluginforOracleRMAN]#
RMAN configuration
We are using our own perl solution, named dmk (https://www.dbi-services.com/fr/produits/dmk-management-kit/), to perform the backup.
Following allocate channel had to be hard coded in our rcv scripts. We hard coded it as workaround for known bug to address through variable the % character:
ALLOCATE CHANNEL VeeamAgentChannel1 DEVICE TYPE SBT_TAPE PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so' FORMAT 'e718bc55-0c60-43bc-b1f7-f8cf2c793120/RMAN_%I_%d_%T_%U.vab';
rcv example for inc0 backup:
oracle@ODA02:/u01/app/oracle/local/dmk_dbbackup/rcv/oracle12/ [rdbms1900] cat bck_inc0_no_arc_del_tape.rcv # # RMAN template: Online full database backup # # $Author: [email protected] $ CONFIGURE ARCHIVELOG DELETION POLICY TO ; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '_%F'; CONFIGURE SNAPSHOT CONTROLFILE NAME TO '_snapcf_.f'; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF DAYS; show all; run { # ALLOCATE CHANNEL VeeamAgentChannel1 DEVICE TYPE SBT_TAPE PARMS 'SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so' FORMAT 'e718bc55-0c60-43bc-b1f7-f8cf2c793120/RMAN_%I_%d_%T_%U.vab'; backup incremental level 0 section sizefilesperset database TAG 'INC0_'; backup filesperset archivelog all TAG 'ARCH_'; backup current controlfile TAG 'CTRL_'; sql "create pfile=''init_.ora'' from spfile"; RELEASE CHANNEL VeeamAgentChannel1; }
Test
I could successfully test a backup on the Veeam tape and confirm with customer that the file was properly written on the server. We could also confirmed the same with RMAN.
oracle@ODA02:~/ [DB1 (CDB$ROOT)] /u01/app/oracle/local/dmk_ha/bin/check_primary.ksh DB1 "/u01/app/oracle/local/dmk_dbbackup/bin/dmk_rman.ksh -s DB1 -t bck_inc0_no_arc_del_tape.rcv -c /u01/app/odaorabase/oracle/admin/DB1_SITE1/etc/rman.cfg" 2025-02-04_11:12:48::check_primary.ksh::SetOraEnv ::INFO ==> Environment: DB1 (/u01/app/odaorahome/oracle/product/19.0.0.0/dbhome_2) 2025-02-04_11:12:48::check_primary.ksh::MainProgram ::INFO ==> Getting V$DATABASE.DB_ROLE for DB1 2025-02-04_11:12:48::check_primary.ksh::MainProgram ::INFO ==> DB1 Database Role is: PRIMARY 2025-02-04_11:12:48::check_primary.ksh::MainProgram ::INFO ==> Program going ahead and starting requested command 2025-02-04_11:12:48::check_primary.ksh::MainProgram ::INFO ==> Script : /u01/app/oracle/local/dmk_dbbackup/bin/dmk_rman.ksh -s DB1 -t bck_inc0_no_arc_del_tape.rcv -c /u01/app/odaorabase/oracle/admin/DB1_SITE1/etc/rman.cfg [OK]::customer::RMAN::dmk_dbbackup::DB1::bck_inc0_no_arc_del_tape.rcv::RMAN_retCode::0 Logfile is : /u01/app/odaorabase/oracle/admin/DB1_SITE1/log/DB1_bck_inc0_no_arc_del_tape_20250204_111249.log 2025-02-04_11:14:17::check_primary.ksh::CleanExit ::INFO ==> Program exited with ExitCode : 0
To wrap up
Using Veeam RMAN plug-in on an ODA is working fine. I hope this article will help you configure it. In a next article I will test the backups restoring it in a new instance.