Veeam plug-in for Oracle RMAN can be used for transactionally-consistent RMAN-based backups of Oracle databases and in some cases (as described in the previous article) it could be the only way (or the preferred way) to manage Oracle database backup.
Probably the best way to manage it is from the Veeam Backup Console, as described in the previous article. But it’s also possible manage it manually.
By default, RMAN sends backups to a native RMAN location on disk (DEFAULT DEVICE TYPE TO DISK). When you configure Veeam Plug-in, the default device type is changed to SBT_TAPE, which gives control over backup media management to Veeam Plug-in.
Thus, after you deploy Veeam Plug-in on an Oracle server, you can perform all backup and restore operations in the Oracle RMAN console. Veeam Plug-in compresses, deduplicates database backups and transfers them to a backup repository connected to Veeam Backup & Replication.
To use Veeam Plug-in you must configure the connection between the Oracle server, Veeam Backup & Replication server and backup repositories where backup files will be stored.
In this post we will see how use it in an unmanaged mode, by manually installing and configuring on the source server.
Manual install of the plug-in
Plug-in installation vary on the different type of OS supported. In this article we will consider the Linux installation on a supported RPM based distribution. For more information see also the offical documentation.
- Veeam Plug-in for Oracle RMAN must be installed on the Oracle Database server.
- The /opt/veeam directory must be writable.
- The NOEXEC mount option must be disabled for the /var and /tmp directories.
- To install the plug-in, use the sudo command or a user with root privileges.
Upload the VeeamPluginforOracleRMAN-12.1.0.2131-1.x86_64.rpm package to the Oracle server (the file is in the Plugins\Oracle RMAN\Linux directory of the installation ISO, or also in the ). Note that are available both RPM and tar.gz format, for 64 and 32 bits architectures.
To install Veeam Plug-in, run the following command:
On the server you can easily check the plugin-installation, for example, for Linux:
Configuring the plug-in
On Linux (or Unix), To configure Veeam Plug-in, you can use OracleRMANConfigTool. The tool configures Oracle RMAN integration settings and creates the veeam_config.xml file which is stored in the installation folder of the plug-in: /opt/veeam/VeeamPluginforOracleRMAN.
Launch the configuration wizard:
For more information see also: https://helpcenter.veeam.com/docs/backup/plugins/configuring_rman_plugin_lin.html?ver=120
Specify the DNS name or IP address of the Veeam Backup & Replication serve
Specify the port which will be used to communicate with the Veeam Backup & Replication server. Default port: 10006.
Specify credentials to authenticate against the Veeam Backup & Replication server.
Using RMAN to backup your database
Before starting RMAN be sure that some variable are set properly according with your environment:
[oracle@ORACLEDB2 ~]$ export ORACLE_SID=orcl
[oracle@ORACLEDB2 ~]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
To create a consistent backup of an Oracle database and redo logs in the ARCHIVELOG mode, run the following script:
On Veeam Backup you will see the job as “normal” job:
Note that you can create a Backup Copy Job to make another copy of your backup on a different repository, with different retention options.
For more examples on other backup scripts, see https://helpcenter.veeam.com/docs/backup/plugins/rman_backup.html?ver=120
Restore options
Restore can be managed from the Veeam Backup using the Oracle Explorer (as described in the previous article) or manually from RMAN.
For example, to perform a full restore from the latest restore restore point:
[oracle@ORACLEDB2 ~]$ ‘/u01/app/oracle/product/19.0.0/dbhome_1/bin/rman’
Recovery Manager: Release 19.0.0.0.0 – Production on Fri Mar 8 11:41:06 2024
Version 19.22.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
RUN {
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALLOCATE CHANNEL c0 DEVICE TYPE sbt PARMS ‘SBT_LIBRARY=/opt/veeam/VeeamPluginforOracleRMAN/libOracleRMANPlugin.so’;
RESTORE DATABASE;
RECOVER DATABASE;
}
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 2415915888 bytes
Fixed Size 8942448 bytes
Variable Size 520093696 bytes
Database Buffers 1879048192 bytes
Redo Buffers 7831552 bytes
allocated channel: c0
channel c0: SID=255 device type=SBT_TAPE
channel c0: Veeam Plug-in for Oracle RMAN
Starting restore at 08-MAR-24
channel c0: starting datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
channel c0: restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_lyknydhl_.dbf
channel c0: restoring datafile 00007 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_lyknz6nt_.dbf
channel c0: reading from backup piece 1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0i2l67bs_18_1_1.vab
channel c0: piece handle=1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0i2l67bs_18_1_1.vab tag=TAG20240308T122219
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:15
channel c0: starting datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
channel c0: restoring datafile 00001 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_lyknwz6g_.dbf
channel c0: restoring datafile 00004 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_lyknz5ks_.dbf
channel c0: reading from backup piece 1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0h2l67bs_17_1_1.vab
channel c0: piece handle=1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0h2l67bs_17_1_1.vab tag=TAG20240308T122219
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:15
Finished restore at 08-MAR-24
Starting recover at 08-MAR-24
channel c0: starting incremental datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00003: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_lyknydhl_.dbf
destination for restore of datafile 00007: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_lyknz6nt_.dbf
channel c0: reading from backup piece 1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0q2l67ks_26_1_1.vab
channel c0: piece handle=1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0q2l67ks_26_1_1.vab tag=TAG20240308T122708
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:07
channel c0: starting incremental datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_lyknwz6g_.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_lyknz5ks_.dbf
channel c0: reading from backup piece 1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0p2l67ks_25_1_1.vab
channel c0: piece handle=1586dca6-1e20-46c5-956c-bccf96097e24/RMAN_1690716189_ORCL_20240308_0p2l67ks_25_1_1.vab tag=TAG20240308T122708
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:07
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 08-MAR-24
released channel: c0
Manually uninstall the Veeam Plug-in for Oracle RMAN
To uninstall Veeam Plug-in and undo the configuration changes, run the following command. Note that the operation requires root privileges.
See also: https://helpcenter.veeam.com/docs/backup/plugins/uninstall_plugin_rman.html?ver=120
To check if the package is still installed:
Of course you have to decide what do with the existing backup.