How to back up and restore an Oracle database — best practices

This article has been updated on November 9, 2021

IT organizations and departments are under enormous pressure to make their applications available for business operation continuity. In case of an error, they need to get critical apps up and running again as soon as possible. The challenges here are very clear:

Companies can meet these availability requirements with a high level of virtualization, investments in modern storage systems and with applications hosting in private, public and hybrid cloud environments. To guarantee accessible and efficient services and operations, and benefit from the combination of these technologies, the entire IT infrastructure should be standardized and properly managed.

Enterprise-grade companies commonly use an Oracle platform for their Tier 1 applications. In spite of the Oracle licensing policy, this platform is more and more frequently operated on VMware and Hyper-V environments.

Veeam and Oracle integration

Veeam can be used as an add-in to virtualized Oracle platforms. In case of an error or failure, it can help to bring Oracle databases back online as soon as possible.

Veeam Backup & Replication can be used either as a sole Oracle backup solution, or as an extension to your existing backup process with RMAN or other existing backup software. Veeam Backup & Replication delivers multiple high-speed recovery features for Oracle platform, including Instant VM Recovery and snapshot-based restores with Veeam Explorer for Storage Snapshots.

In terms of system requirements, to enable Oracle availability with Veeam, you need Veeam Backup & Replication and Oracle Database running on a Windows-, LINUX-, SOLARIS- or AIX-based VMs, physical servers or cloud environments.

You can find a comprehensive example of Veeam and Oracle integration as well as best practices for Oracle backup and restore in this white paper: Veeam Availability Suite and SAP on Oracle Deployment Guide.

Oracle Database protection methods

Veeam can protect Oracle Database in three different ways.

Oracle Database protection with Veeam Plug-in for SAP on Oracle

Veeam Plug-in for SAP on Oracle uses the SAP Backint functionality to protect Oracle databases running on Linux-based SAP environments. This plug-in is certified from SAP. Once the plug-in is installed on “ORACLE DATABASE HOST” of an SAP instance, it can integrate with BR*Tools and all the backup/restore operations can be carried from BR*Tools.

If is it intended to protect the database with RMAN along with BR*Tools, then change the BR*Tools parameter, i.e, update the file initSID.sap with the following parameters:

rman_channels = 4
rman_channels_arch = 1
rman_parms = "SBT_LIBRARY=/opt/veeam/VeeamPlug-inforOracleRMAN/libOracleRMANPlug-in.so"
rman_parms_arch = "SBT_LIBRARY=/opt/veeam/VeeamPlug-inforOracleRMAN/libOracleRMANPlug-in.so"

After these changes on running backup through BR*Tools, the database will be backed up via RMAN commands.

Please note, if the DB instance is installed in a separate box other than PAS instance, then while configuring the plug-in, the Veeam profile will be saved under /tmp/Veeam_init.sap.

Run the BR*Tools in that case with:

BR*Tools -p /tmp/Veeam_init.sap

More information: Veeam Plug-in for SAP on Oracle user guide.

Oracle Database protection with Veeam Plug-in for Oracle RMAN

Veeam Plug-in for Oracle RMAN uses Oracle RMAN functionality to back up Oracle databases.

The RMAN plug-in is deployed on an Oracle server as an SBT plug-in and all backup and restore operations can be performed in the RMAN console. The database backups will be transferred to Veeam backup repositories via the plug-in. The Oracle database administrator thus has everything under their full control.

To protect Oracle databases with the Veeam Plug-in for Oracle RMAN, first the rpm package for the plug-in needs to be installed. The next step is to configure the plug-in. Once the plug-in is configured, the Oracle database can be protected and recovered via RMAN commands.

More information: Veeam Plug-in for Oracle RMAN user guide.

Oracle Database protection along with image-level backup

Veeam creates image-based backups on a block level and protects entire VMs as a copy regardless of its content. Backup efficiency and speed is increased by using Change Block Tracking (CBT) technologies for VMware/Hyper-V VMs and physical servers. CBT allows Veeam to pull out the changed blocks of data in every backup job run which optimizes data flow and backup time. Although only the changed data is processed, a backup job results in a consistent, full backup of the database itself because the restore point includes a restorable image of the full VM, which includes the database itself.

Storage snapshot integrations can be used for VMware windows server to optimize additional RPO & RTO windows.

To back up your Oracle server, create a new backup job in Veeam Backup & Replication:

Add the required VMs:

Specify your backup repository:

During the backup process, Veeam Backup & Replication connects to VMs via the network or the VMware VIX channel (Windows-based VMs only) and examines VM content. If applications such as Oracle are detected, Veeam starts application-aware image processing, a special mechanism to maintain applications and database consistency in backups:

In the case of Oracle, Veeam Backup & Replication automatically examines environment variables where the databases are located and shifts them into backup mode. The main command that Veeam executes apart from the others is “ALTER DATABASE BEGIN BACKUP.” The backup job is retained for a couple of seconds to take a VM snapshot and then releases the backup mode on the DB afterwards (after some seconds). The snapshot is then used to create the actual backup.

Additionally, as an extension of the methods described above, storage snapshots can be used to reduce the load on VMware, optimize VMware snapshot processing, bring you faster restores and allow you to more frequently create backups. Optionally, you can create in a short frequency, crash-consistent storage snapshots. Crash-consistent processing ensures that the VM data is secured at the same time points from all hard disks to be compatible with Oracle during restore.

Along with the image-level backup, you can perform Oracle archive log backups as frequently as needed to have the least possible data loss in case of failure, and to enable point-in-time recovery or restore to a specific transaction.

There are various other Oracle commands and RMAN scripts used by Veeam according to the Oracle best practice backup and restore guidelines to check the database is consistent after the restore. The full list of commands is documented in the Appendix of the white paper, Veeam Availability Suite and SAP on Oracle Deployment Guide.

Within a backup strategy, it is common to initiate an image-level backup once a day, and to generate a backup from a crash-consistent snapshot every 10 minutes depending on the load of your storage system. Additionally, it’s suggested to carry out an Oracle archive log backup with RMAN or Veeam Backup & Replication every 5 – 60 min.

Once you complete the Oracle backup job configuration, click Finish to start the backup process:

Oracle restore from an image-level backup

Veeam Backup & Replication gives you a choice of options to restore Oracle databases. You can restore from an image-level backup or from storage snapshots. Instant VM Recovery is used to start the entire server in just two minutes (+ boot time) or to granularly recover files.

Additionally, with the Veeam Explorer for Oracle Restore Wizard, the databases can be recovered to a specific point-in-time or to a specific transaction from image-level backups in combination with archive log backups. Here you can decide depending on the situation.

Above all, Instant VM Recovery and Veeam Explorer from Storage Snapshots options can help you make the application available faster in case of a system disaster.

A classical full VM restore is also possible with a function called Quick Rollback. It is very fast as well, but it only recovers the changed blocks till the last backup.

A more manual option is to use Instant VM Recovery technology to just mount the VM disk with the database out of the backup to the original VM. A database admin can then use the database directly and you can transfer the data back with Storage vMotion. The best practice is to place a copy of the control file on the same disk.

Veeam’s SureBackup technology and On-Demand Sandbox excel here apart from Quick Rollback. With SureBackup, Oracle server can be run on full recoverability, including application start exam in a Sandbox environment. In this virtual lab, you can also run your own test scripts against the application.

A test environment created with On-Demand Sandbox can be used for testing upgrades in order to examine beforehand whether a change would affect the application or Oracle server.

Veeam Explorer for Oracle

Veeam Explorer for Oracle is a UI that is provided by Veeam which can be used to perform different types of database restore operations.

One of the new features in V11 is the instant recovery of Oracle databases which uses the Veeam database publishing feature along with data restore functionality to quickly restore the database as compared to traditional restores.

The screenshot below is an example of a Veeam Explorer for Oracle database where one can see its restore features, such as restore database, instant recovery, publish database, etc.

More information on Veeam Explorer for Oracle can be found in our user guide.

Exit mobile version