Oracle
General
Veeam can back up Oracle databases via image level backup or via an RMAN plug-in. Choosing which one to use depends on your environment, requirements and limitations. You can also mix and match these methods to achieve more restore options and granularity, though when you handle archive logs, be sure to do this in only one of the backup methods to keep consistency.
Oracle Image-Level backup
Job configuration
Avoid using aggressive log truncation settings for databases protected with Data Guard as it may affect logs synchronization to a secondary server. Data Guard should have enough time to transport logs remotely before they are truncated. Thus generally having “Delete logs older than” option configure to less than 24 hours is not recommended.
Archived log backup
Please be aware that archived logs are processed periodically and stored in a temporary folder inside the VM before transmitting them to the log shipping / repository server.
Windows
The default location of the temporary folder on Windows systems is <drive with most free space>:\Veeam\Backup\OracleLogBackup
.
If you wish to specify the location of the temporary file, you can do so by adding or changing the OracleTempLogPath
registry value in the guest OS:
Item | Value |
---|---|
Path | HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication |
Key | OracleTempLogPath |
Type | REG_SZ |
Default | undefined |
Linux
For Linux, the directory with the most free space will be chosen between /var/tmp
and /tmp
in the default configuration. To change this path, create a file in /tmp
called VeeamOracleAgent.xml
with the following content, where /location
has to be replaced with your desired path:
<config OracleTempLogPath=”/location”></config>
Oracle restore and failover workflow
Before the backup, the database (in ARCHIVELOG mode only) is put into backup mode. This has to be taken into consideration when performing a restore. Restoring the database server VM is not enough for restoring the service. The database has to be put out of backup mode:
ALTER DATABASE END BACKUP
Veeam Plug-in for Oracle RMAN
Please review the general Enterprise Plug-In best practices additionally to the following.
Oracle Enviroment
Veeam performs SQL queries on Oracle database to collect the statistical information about the RMAN job process. Based on the available resources Oracle can decide to use Temp Tablespace resources. As a best practice configure the Temp Tablespace resources to avoid shortage of Temporary tablespace.
You can check the Temp Tablespace size with the below SQL query:
SELECT * FROM DBA_TEMP_FREE_SPACE;
You can also create new temp tablespace, for example the new tablespace for 500MB:
CREATE TEMPORARY TABLESPACE TEMP_NEW TEMPFILE '/DATA/database/ifsprod/temp_01.dbf' SIZE 500m autoextend on next 10m maxsize unlimited;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP_NEW;
Oracle RAC
When scanning for database instances Veeam uses two methods:
-
If an
oratab
file is present we use the content. Databases must be listed asORACLE_SID:ORACLE_HOME
to be identified correctly. If your database is listed asDB_UNIQUE_NAME:ORACLE_HOME
or not at all, please add it accordingly. -
If no
oratab
file is present we leverage thesrvctl
tool and use it’s output.
It is recommended to install the Veeam Pugin for RMAN on all Oracle RAC nodes to be able to get backups from every node.
Oracle Home
It’s recommended to backup the Oracle home along with Oracle RMAN backup. You can use the Veeam Agent or Veeam Backup & Replication image level backup for this.
Oracle on Windows
Make sure that the system environment of the Oracle server process contains $ORACLE_HOME/bin
in it’s PATH
variable.
The Veeam Plug-In for Oracle requires to find oci.dll
in the PATH
when executed. As the Plug-In process is started from the Oracle server process, it will inherit it’s environment which includes PATH
. If the oci.dll
cannot be found in the PATH
you will encounter ORA-19554
and ORA-27002
and error messages around failures in loading media management or allocating devices.
To solve this issue add $ORACLE_HOME\bin
to the PATH
environment variable for the Oracle server process, e.g. by adding it to the SYSTEM environment or to the user’s environment who runs the Oracle server process.
Veeam Sizing
It is important to understand the amount of channels being used in parallel. Also consider the restore operations for the large environment where during the backup operations for database A and database B, you will need to perform restores for Database C.
Please refer to General Plug-In Design Best Practices and the RMAN Channels and Resource Consumption section in the Veeam Help Center to size your Veeam infrastructure.
Network
Network plays the important role in the overall backup performance.
The following network settings should be configured:
Item | Value | Comments |
---|---|---|
Jumbo Frames | Enable | Veeam Repository and Oracle Servers |
Network Speed | Mutiple 10 Gbps cards | ideally dedicated layer 2 network for backup operation |
IPV6 | Disable | IPv6 should be disabled on Oracle Database server when possible |
RMAN Settings
RMAN Backup Retention
The RMAN backup retention is controlled by RMAN, you cannot set the different retention policy on the backups, RMAN retentions is set globally.
Use Veeam backup copy option to configure additional/different retention policy.
To configure the backup retention policy to 7 days on RMAN use:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
RMAN FILEPERSET
FILESPERSET set as one can increase the backup performance, FILESPERSET settings can be increased based on the environment, it’s recommended to test the different value and use the one which validate the performance improvement.
Generally the ideal value for FILESPERSET is ranging from three to five.
MAXPIECESIZE
MAXPIECESIZE can help to limit the backup piece for the large database file. The smaller files can be a good fit for the Scale-out Repository and optizmed Veeam backup copy operations.
MAXOPENFILES
This defines the number of files that can be read simultaneously by each channel, the default number of MAXOPENFILES is eight.
You can reduce or increase the MAXOPENFILES depends on source server load, if the source server is overutlized, consider reducing the MAXOPENFILES to be best fit for the enviroment.
RMAN compression
Compression helps to reduce the space utilized by backup set on the backup storage, RMAN uses a binary compression algorithm for the backup set. The default compression algorithm setting is BASIC and does not require the Advanced Compression Option.
RMAN compression is CPU intensive and CPU avabaility can be a limiting factor.
Compression Mode | Default | Backup Size | CPU overhead |
---|---|---|---|
Basic | Yes | Small | Very Low |
Low | No | Small | low |
Medium | No | smaller than low | High |
High | No | Smallest | Very High |
If you are using RMAN compression, disable Veeam compression.
Granular item restore
Oracle restore using Veeam Explorer for Oracle uses a combination of executing commands via SSH or RPC depending on the platform, and using the RMAN client. VM disks are mounted to target server using iSCSI (Windows) or FUSE and loop device (Linux). Only database files will be restored, not instance files. Instance files may be recovered through file-level recovery if needed.
Ensure the account used to connect to target/staging server has enough permissions on operating system and database as described in the corresponding section of User Guide.
Note: When restoring to Linux ensure that account used to connect to restore target server has valid shell (bash
).
References
- BP Guide - General Enterprise Plug-In Best Practices
- Veeam Plug-in for Oracle RMAN
- Change the Oracle Default Path
- Help Center - Oracle Log Backup
- Supplemental details on Veeam’s Oracle handling