Veeam Backup & Replication Best Practice Guide
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 biggest 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
Veeam Plug-In for Oracle RMAN supports two configurations: Managed mode for centralized Veeam-controlled deployment, scheduling, and policies, and Standalone mode for DBA-controlled RMAN scripting and scheduling, including environments such as Oracle Data Guard.
Managed Oracle RMAN Plug-In
- Centralized management through Veeam Backup & Replication.
- Policy-based scheduling and database processing through Application Backup Policies.
- Central visibility of policies and backup sessions.
Standalone Oracle RMAN Plug-In
- DBA-controlled operations, using native RMAN workflows and scripts.
- Flexible scheduling through RMAN, Oracle, or external schedulers.
- Broader cluster flexibility, including Oracle Data Guard, which is supported in Standalone but not Managed mode.
Please review the general Enterprise Plug-In best practices additionally to the following.
Oracle Environment
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
oratabfile is present we use the content. Databases must be listed asORACLE_SID:ORACLE_HOMEto be identified correctly. If your database is listed asDB_UNIQUE_NAME:ORACLE_HOMEor not at all, please add it accordingly. -
If no
oratabfile is present we leverage thesrvctltool and use it’s output.
It is recommended to install the Veeam Plug-In 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.
once the Plug-In process started from the Oracle server process, it will inherit its 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 number of channels being used in parallel. Also throughput is important, because it determines if the required data volume can be processed within the available backup window.
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 are 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;
Oracle Plug-in GFS Retention
Preservation of Oracle backups through weekly, monthly, and yearly retention points to ensure compliance, recoverability, long-term retention and efficient storage utilization.
Backup sets created with the RMAN KEEP option are considered archival by Oracle.
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.
SECTION SIZE
Specifies the size of each backup section produced during a data file or data file copy backup.
By setting this parameter, RMAN can create a multisection backup. In a multisection backup, RMAN creates a backup piece that contains one file section, which is a contiguous range of blocks in a file. All sections of a multisection backup are the same size.
File sections enable RMAN to create multiple steps for the backup of a single large data file. RMAN channels can process each step independently and in parallel, with each channel producing one section of a multisection backup set.
[!NOTE] RMAN always creates multisection backups with FILESPERSET set to 1.
If you specify a section size that is larger than the size of the file, then RMAN does not use multisection backup for the file. If you specify a small section size that would produce more than 256 sections, then RMAN increases the section size to a value that results in exactly 256 sections.
[!NOTE] Depending on where you specify this parameter in the RMAN syntax, you can specify different section sizes for different files in the same backup job.
[!NOTE] You cannot use SECTION SIZE with MAXPIECESIZE.
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 overutilized, consider reducing the MAXOPENFILES to be best fit for the environment.
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 availability 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).