Home > Backup and Recovery Blog > How to Backup Oracle Database with Bacula? Oracle Backup and Recovery Technical Overview.

How to Backup Oracle Database with Bacula? Oracle Backup and Recovery Technical Overview.

Updated 10th April 2024, Rob Morrison

Oracle backup

What is Oracle Backup and Recovery?

Typically, backup and recovery operations are regarded as the key pillars of data protection. Oracle databases are no exception to this rule, and having at least one backup of your database is practically a necessity for any serious business. No company wants to lose years’ worth of data because of a simple error or an unfortunate accident.

An Oracle backup is a copy of your data that can be used to reconstruct your original database’s contents. Unless specified otherwise, most backup and recovery documentation refers to a physical backup (an actual backup of all information inside a database) as the “backup” term.

Backup and recovery software for Oracle should ideally be able to protect database contents and instances and RAC – Real Application Clusters. For an enterprise, backup software typically needs to meet all of the IT department’s goals and metrics, including its business’s future estimated requirements, security needs, compliance demands, and more. If not, it is likely that yet a new implementation with different software would be needed before realizing ROI on the initial deployment.

Why is it important to create backups of Oracle databases?

Oracle databases often store some of a company’s mission-critical information – partner profiles, customer records, business data, etc. These same databases are often used to store information that may be necessary for other business workflows. These factors alone show why data stored in Oracle systems is typically highly valuable and sensitive and must be protected.

While plenty of users understand the importance of Oracle backups as a whole, the issue is not necessarily that easy to solve. The amount of data stored in an average Oracle database is rising at an alarming pace, and compliance regulations regarding data retention and security are getting more and more strict with each passing year.

This creates an environment where it is genuinely difficult to keep up with all of the modern-day demands on Oracle database security. In this context, choosing the correct Oracle backup option becomes even more important, knowing how much is at stake and how much a single business can lose if its backup solution fails for some reason.

Different elements of Oracle backup and recovery operations

Oracle backup and recovery operations have plenty of unique characteristics that are worth mentioning, but there are also plenty of processes that work the same way any other backup process functions. Our next step would be to go over three primary backup types applicable to Oracle databases (full, incremental, differential), as well as hot and cold backups, both of which are more specific to how databases operate.

Main backup levels for Oracle databases

There are three backup types or levels that are applicable to most existing data types, and the majority of their characteristics also remain the same, even in cases such as creating backups of Oracle databases.

Full backup implies the creation of a complete copy of a database’s contents. The nature of a database means the methods of creating one such backup would differ from traditional disk-based storage (for example, most businesses and services prefer to use Oracle Recovery Manager, or RMAN, to do most backup operations). However, the process itself remains the same at its core – creating a complete copy of the entire database during a specific time frame, with all of its data, metadata, structure, and so on.

Incremental backup operates roughly the same for Oracle as it would for any other storage type – creating a copy of every single piece of information that was modified since the last backup (no matter if it was full, incremental, etc.). RMAN recognizes two different levels of an incremental backup: Level 0 and Level 1. The former is the equivalent of a regular full backup (capturing the entire database), while the latter is closer to a traditional incremental backup (capturing changes made since the last backup of any type).

Differential backup works as an alternative to incremental backups since they still copy all of the information modified since the last backup, but the only backup types that the differential backups “recognize” are full backups. Unlike incremental backups, differential ones tend to take more storage space as time goes on, so the correct timing between full and differential backups is important to preserve storage space and system performance.

Having a clear understanding of all the backup types and their specifics in the context of Oracle databases is an essential part when it comes to creating comprehensive backup strategies. None of these backup methods are mutually exclusive, and most strategies include multiple backup types to achieve the best possible compromize between storage space, performance, and security.

Cold and Hot backup strategies

Both “hot” and “cold” backups are named after the states of a database. The “hot” database is active, while the “cold” is powered off. Unlike the previous backup types, “hot” backups differ from “cold” ones quite significantly, especially when it comes to their capabilities.

“Hot” backup (sometimes referred to as “online” backup) is a data backup method performed during the active state of the database. It can offer practically no downtime to end users and zero task interruptions as a result, both of which are the most significant advantages of this approach.

The entire backup process is made possible by the RMAN, creating a consistent snapshot of the entire database, which makes it possible to copy information without system interruptions. Even if some changes were made to the database during the backup process – they are also added to the results of the hot backup retroactively.

Of course, this backup type is not without its own issues, and the biggest potential drawback is the sheer amount of system resources such a process takes. The total load of a single hot backup process is significant enough to affect the total performance of the database, so it is always a wise idea to plan all of the backup operations beforehand to avoid process disruptions and other inconveniences.

“Cold” backup is another data backup method that operates during the time when the database is powered down. The consistency and accuracy of such a backup are its biggest advantages, and the overall ease of use is also quite substantial. The fact that the database is not active during the entire backup process significantly simplifies both the setup and the process at the same time.

At the same time, there are not that many situations where a modern business can afford for its database to be powered down without experiencing some drawbacks, most of which can turn into negative financial outcomes down the line. As such, the prime use cases for cold backups are either industries or companies where downtime is acceptable or smaller databases that can be turned on and backed up faster.

The nature of a cold backup implies that most complex businesses and organizations can only use cold backups on an infrequent basis. In some cases, these organizations would have an easier time upgrading their hardware to alleviate the performance drop from hot backups instead of agreeing to a regular database downtime.

That’s not to say that these backup types are mutually exclusive, far from it. There are many database backup strategies that use both hot and cold backups in a specific manner (where cold backups are only used every once in a while for the sake of consistency and accuracy).

Hybrid backup strategy

As its name might suggest, a hybrid backup strategy makes it possible to combine the advantages of cold and hot backups for the best data protection in Oracle. Being able to use both backup types when they are the most useful can be a great backup strategy that offers a comprehensive approach to database security.

For example, cold backups work at their best when performed outside of peak workload hours to ensure that there is a consistent baseline of information to recover from. On the other hand, hot backups are a great source of “incremental” information and can be performed much more frequently to minimize the amount of up-to-date information that could be lost as a result of a disastrous event.

The same logic is also applied to recovery scenarios for improved efficiency. As such, cold backups can be restored after a disaster in order to receive a consistent state of the entire database at a single point in time, and then users can also restore hot backups to bring the database to its most up-to-date state possible. Meeting recovery point objectives and recovery time objectives at the same time is a lot easier with a properly defined hybrid backup strategy.

Oracle Backup Strategy

Within the capabilities of Oracle there are two main backup strategies: RMAN and user-managed.

RMAN, or Recovery Manager, is a solution that is fully integrated within the Oracle database. It can perform a variety of backup-related activities and can be controlled using either the Oracle Enterprise Manager (OEM) or using the command line.

User-managed backups are basic backups that can be performed using a combination of host operating system commands and SQL*Plus recovery commands. All of the backup-related aspects must be defined manually in this case for every backup.

While there are two backup types that are supported, RMAN is the most commonly preferred one, so the majority of the Oracle backup capabilities are focused on this backup type.

One major advantage of an RMAN backup is the ability to create backups while the database is open and/or mounted. The backup command itself is also relatively  easy; the prompt itself looks relatively straightforward:

BACKUP DATABASE;

It is possible to add a number of additions or parameters to this command. For example, if we also want to include archived logs in the backup, the prompt changes accordingly:

BACKUP DATABASE PLUS ARCHIVELOG;

Another option that is available with RMAN is the ability to create incremental backups – a backup type that copies only specific files that were changed since the last backup of any type (depending on the backup type, it can be either cumulative incremental backup or differential incremental backup).

When it comes to commands, the backup prompt is relatively similar (with possible additions in the form of various parameters):

BACKUP INCREMENTAL;

There’s also the fact that shadow copies/snapshot files can also be created with the RMAN’s incremental backups. For example, the command to create an incremental backup in the fast recovery area can be initiated using the following sequence:

BACKUP INCREMENTAL LEVEL 1 … FROM SCN

Basic configuration of backup processes in Oracle

While we have mentioned how RMAN is a preferred backup method in most use cases for Oracle, we are still going to go over the user-managed backups in this explanation, as well.

  • Configuring RMAN backups

Configuring RMAN for Oracle backups includes multiple steps to make sure that the backups are properly scheduled and protected. Here is a basic explanation of this configuration process.

  • #1: Configure RMAN

To configure the RMAN environment, it needs to be started first and connected to the database that needs to be backed up (in SQL):

rman target /

Connecting to the RMAN catalog database here is also recommended, although it is not mandatory (in SQL):

rman target / catalog rman_user@catalog_db
  • #2: Configure backup policies

This step covers setting up the default device type and the backup retention policy. The former is a choice between disk or SBT_TAPE (in SQL):

CONFIGURE DEFAULT DEVICE TYPE TO DISK;

The latter sets up a definitive recovery window for future backups (in SQL):

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
  • #3: Configure backup schedule

Practically any custom backup script can be scheduled using either a cron job or an Oracle Scheduler. Below you’ll find a standard example of an RMAN script configured for a full database backup (in SQL):

RUN {

ALLOCATE CHANNEL c1 DEVICE TYPE DISK;

BACKUP DATABASE PLUS ARCHIVELOG;

RELEASE CHANNEL c1;

}

The script in question has to be scheduled to run at regular intervals to create consistent backups for the target database.

  • Configuring user-managed backups

Manual Oracle backups are performed using SQL*Plus and a variety of OS commands. The process is roughly the same here, although the commands themselves are very different.

  • #1: Prepare the database

Putting the target database in the backup mode is a mandatory first step (in SQL):

ALTER DATABASE BEGIN BACKUP;
  • #2: Copy information from the database

The OS commands are used here to copy information from the database to a designated backup location. The command sequence in question is likely going to differ from one OS to another. Here is an example from the Unix/Linux operating system (in bash):

cp /u01/app/oracle/oradata/mydb/*.dbf /backup/mydb/
  • #3: Revert the state of the database

To make it possible for the original database to resume its operations, it needs to be taken out of the backup mode (in SQL):

ALTER DATABASE END BACKUP;

Another recommendation here is to back up archived redo logs and the control file, although it is not a mandatory step (in SQL):

ALTER DATABASE BACKUP CONTROLFILE TO ‘/backup/mydb/controlfile.bkp’;
  • #4: Verify backed-up data

Make sure that the files have all been copied correctly and are located in a designated storage directory.

Advanced RMAN capabilities

RMAN offers plenty of interesting features that practically anyone could take advantage of. As an example, we have taken two distinct features to cover below: encryption and the RMAN catalog.

Backup encryption is a basic security recommendation for any backup type, and Oracle databases are no exception. RMAN can apply encryption to backups automatically, but it needs to be configured properly beforehand:

  • #1: Configure the encryption algorithm:
CONFIGURE ENCRYPTION ALGORITHM ‘AES256’;
  • #2: Enable the backup encryption feature:
CONFIGURE ENCRYPTION FOR DATABASE ON;
  • #3: Generate encrypted backups:
BACKUP AS ENCRYPTED DATABASE PLUS ARCHIVELOG;

RMAN Catalog offers better reporting capabilities and improved information management for backed-up data. It can be enabled using the following sequence of commands:

  • #1: Connect to the catalog database and create a new catalog schema:
rman catalog rman_user@catalog_db

CREATE CATALOG;

  • #2: Register the backup target database in the catalog:
rman target / catalog rman_user@catalog_db

REGISTER DATABASE;

  • #3: Perform backup tasks as usual while the database is connected to the catalog (for improved reporting, easier management, and centralized metadata storage):
rman target / catalog rman_user@catalog_db

BACKUP DATABASE PLUS ARCHIVELOG;

Optimization and fine-tuning for Oracle backups

Of course, it would always be a wise idea to keep fine-tuning and optimizing the existing backup configuration to make sure it’s performing at peak efficiency with no major issues. We have collected several practical tips and strategies that can help with Oracle backup fine-tuning below:

  • Take full advantage of the hardware’s capabilities

It is completely possible that the current hardware can offer much more performance if configured correctly, or it is possible to replace said hardware with a far better version with little effort and minimal budget costs.

As an example, Solid State Drives are extremely affordable right now, and they perform a lot better than any Hard Disk Drive.

Alternatively, if the backups are transferred over a network, it should support high-speed data transfer by default. In some cases, it is also much more efficient to use a dedicated network purely for backup and recovery purposes if the existing network is not up to the task or is already overloaded with traffic on a regular basis.

  • Monitor and test the performance of backup operations

All backup (and recovery) tasks and scripts should be tested on a regular basis to find bottlenecks and potential issues. Resolving these problems would drastically increase the chances of both processes working as intended when it matters. Oracle Enterprise Manager can be a viable option here, with detailed insights into all kinds of backup performance metrics.

  • Combine incremental backups with BCT

The overall backup process can be significantly sped up using incremental backups in tandem with Oracle’s Block Change Tracking feature. It drastically reduces the amount of data per backup by keeping track of all the blocks that have been changed since the last backup so that RMAN can only back up blocks that have been changed. Here is how it can be set up:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE ‘/path_to_tracking_file’;
  • Adjust RMAN parameters if necessary

There are multiple parameters inside RMAN that can be fine-tuned to improve backup performance to a certain degree. Here, we are going to go over three common examples: parallelism, backup compression, and block size.

  • Parallelism is a configuration parameter that enables concurrent read and write operations using multiple channels. The command to configure this setting looks as follows:
CONFIGURE DEVICE TYPE DISK PARALLELISM 4;
  • Backup compression is a built-in feature of RMAN, reducing the backup size while saving storage space. However, it does increase total CPU usage during backup and recovery processes, so it should be used with caution and awareness. The command to enable such a feature is presented below:
CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘11.2.0’ OPTIMIZE FOR LOAD TRUE;
  • Block size is an adjustable parameter in RMAN that directly affects the I/O performance during backup tasks. It is necessary to find a proper balance in every single use case for a number of reasons, but it would be fair to say that larger block sizes are generally capable of improving the backup speed by reducing the number of I/O operations that have to be performed.
  • Allocate multiple channels to backup tasks

RMAN can also be configured to perform read and write operations using multiple channels, which tends to drastically reduce the total backup type. The script that can do so should look like this:

RUN {

ALLOCATE CHANNEL c1 DEVICE TYPE DISK;

ALLOCATE CHANNEL c2 DEVICE TYPE DISK;

BACKUP DATABASE PLUS ARCHIVELOG;

}


As you can see, there are plenty of capabilities that RMAN, as a native Oracle backup solution, can offer. At the same time, it does have its own limitations, and this is where third-party backup solutions come in. But first, we should cover the methodology that is going to be used for the following representation of third-party backup solutions.

Methodology for showcasing different elements of third-party Oracle backup tools

Oracle databases are inherently complex and sophisticated entities. Therefore, it is not surprising that third-party Oracle backup software can be somewhat challenging, especially in a highly competitive market. This article aims to present multiple backup solutions and explain why customers may – or may not – choose to opt for any of them.

Customer rating

If you need backup software that provides a range of options, public opinion – in the form of customer ratings – can be a very useful factor to consider. You can find customer ratings on various platforms like G2, TrustRadius, and Capterra. Checking customer ratings is a quick and easy way to see the public consensus on the topic of a specific software solution.

Capterra is a platform that hosts more than 2 million registered reviews across various categories. The platform is committed to maintaining the authenticity of the reviews and does not remove any customer reviews upon the vendor’s request.

TrustRadius has a rigorous process to ensure that all reviews on its platform are authentic. An in-house research team examines each review to guarantee that it provides valuable insights. No vendor can modify or delete customer reviews on TrustRadius.

G2 is another reputable review platform that offers over 100,000 vendors and more than 2.4 million verified user reviews. Their review validation system ensures the complete validity of every review. Aside from reviews, G2 provides multiple other services like tracking, investment, and marketing.

Key features, benefits, shortcomings

Describing the key features of a software solution, as well as its advantages and disadvantages, can be a rather difficult task. Backup software is a perfect example of this – it has many features, some of which may only be relevant to a specific audience, making it practically impossible to determine a solution that fits every single potential customer’s needs. Oracle backup tools are no exception to this rule since each software provides its own set of capabilities that may only be necessary for a very specific audience instead of the entire market.

Pricing

The price of the software in a corporate environment is one of the most important factors out there. Both small and large businesses have specific budgets they have to work with, and fitting all of the necessary features into such a budget can be rather challenging. We try to present as much pricing information as possible in these sections, but the enterprise software sector is well-known for having practically no public pricing information available, which makes the task of researching pricing information that much more challenging.

Personal opinion of the author

This category can include different topics, such as a brief summary of the software, an interesting fact that hasn’t been mentioned yet, and any other relevant details. The main goal is to present the author’s personal view on the subject, offering an additional and more subjective perspective on the product.

Third-party software for Oracle backup operations

The original goal of most third-party backup solutions is simple – to provide services that either match or excel the built-in capabilities in terms of performance and feature set. The four examples below are often considered some of the most prominent backup solutions with Oracle support on the market.

Veeam

Veeam is a well-known multifunctional backup and recovery platform. One of its many capabilities is Oracle integration, which provides plenty of features with which to work. Not only can Veeam be added as an additional backup system to the existing Oracle backup setup (be it with RMAN or via other third-party software), but it can also handle all of the Oracle-oriented backup matters by itself. Veeam is fast, versatile, and can offer multiple valuable features to Oracle users – such as a snapshot-based restore process, instant VM recovery, support for multiple operating systems, and image-level backups.

Customer ratings:

  • Capterra4.8/5 points based on 69 customer reviews
  • TrustRadius8.8/10 points based on 1,237 customer reviews
  • G24.6/5 points based on 387 customer reviews

Advantages:

  • Veeam’s customer support team is well-known for its fast and resourceful help.
  • The solution itself is user-friendly and reliable, with years of experience and satisfied clients to prove it.
  • The first-time setup process is simple and relatively painless.

Shortcomings:

  • Several areas where Veeam’s capabilities are somewhat lacking, such as data management and cyber security.
  • The pricing model is needlessly complicated, making it quite challenging to calculate the total cost of the software.
  • The overall interface feels clunky and somewhat outdated, especially when used alongside other modern software examples.

Pricing (at time of writing):

  • The official information regarding Veeam’s pricing is limited on their website. A personalized quote must be requested to receive an accurate price for the services needed.
  • However, Veeam offers a pricing calculator page where users can select the number of environments they want to cover and the planned subscription period.
  • This includes the option to purchase subscriptions for at least one year up to five years and additional discounts with multi-year contracts.
  • Users can choose the appropriate workload type, such as Virtual VM, Cloud VM, Servers, Workstations, M365 Users, and NAS/File Shares (TB). If the “NAS/File Shares” field is not above zero, the “Contact Us” button will not be available.
  • Veeam sells licences in increments of five at a time. For instance, to protect five workloads of Virtual VM, Cloud VM, Server, or Workstation type for a year, the cost is $642. 
  • However, the “Microsoft 365” category requires at least ten users to be selected at once, with a starting price of $306.

My personal opinion on Veeam:

Veeam is a well-known backup and recovery solution that caters to physical, virtual, cloud, and hybrid environments. It has a centralized dashboard that streamlines the management of different backup types, thereby increasing software efficiency. Veeam is often treated as one of the best backup solutions on the market. However, some industry-leading vendors provide much better security levels than Veeam. Additionally, the pricing model can be confusing as some of its features are priced significantly higher than others without clear justification.

Cohesity

One of the most significant aspects of Cohesity as a backup software is the ability to eliminate data silos by restructuring the existing infrastructure elements in a particular fashion. This allows Cohesity to improve the performance of most systems (including Oracle-based ones), whether they are using cloud storage, physical storage, or some sort of hybrid setup. Cohesity’s backup and restore processes are fast, application-consistent, and use multiple cutting-edge features to improve the overall backup handling process significantly (such as the support for incremental forever backup type).

Customer ratings (at the time of writing):

  • Capterra4.6/5 points based on 49 customer reviews
  • TrustRadius8.3/10 points based on 81 customer reviews
  • G24.4/5 points based on 47 customer reviews

Advantages:

  • The first-time configuration process is not particularly difficult and could be managed by most users.
  • The user interface of the solution is easy to work with.
  • The management centralization capabilities make it a rather convenient option when it comes to working with multiple backup processes at the same time.

Shortcomings:

  • There is little to nothing Cohesity can offer in terms of automation capabilities.
  • Backup processes are not as customizable as what most competitors can offer.

Pricing (at the time of writing):

  • Cohesity does not offer any pricing information to the public; the only option to receive such information is to contact the company directly.

My personal opinion on Cohesity:

Cohesity is a backup solution with a large selection of features, which makes it a great fit for enterprise-grade clients with comprehensive data security requirements. It supports a selection of storage environment types, can offer exceptional backup performance, and so on. Cohesity’s unique approach to the backup infrastructure makes it significantly easier to scale upwards when necessary using its node-like structure. The addition of a user-friendly interface also tends to improve the average user experience, making it somewhat better than what most competitors can offer. At the same time, it is a rather challenging field to work in, so Cohesity has its fair share of disadvantages – be it the short list of automation capabilities or the lack of customization for most backup operations.

Rubrik

Rubrik offers an outstanding platform for backup and recovery tasks that boasts multiple years of success and hundreds of satisfied clients. Not only can it work with databases such as Oracle, but it also supports plenty of other storage types, offering data protection, backup migration, and so on. As for the Oracle specifically – Rubrik’s Live Mount support can grant near-zero RTOs, and its incremental forever backups offer an increased level of security without wasting a lot of storage space. It can even automate entire RMAN workflows while offering a certain level of protection if required.

Customer ratings (at the time of writing):

  • Capterra4.7/5 points based on 47 customer reviews
  • TrustRadius8.8/10 points based on 215 customer reviews
  • G24.6/5 points based on 80 customer reviews

Advantages:

  • Plenty of automation capabilities to choose from, with the ability to customize most of them.
  • A user-friendly and convenient interface.
  • Support for many deployment and storage types, with considerable flexibility for larger and more complex infrastructures.

Shortcomings:

  • A relatively common issue of an overly sophisticated and complex first-time setup process.
  • An incredibly limited selection of official documentation such as whitepapers.
  • The support for a large selection of storage types does not mean that the software is equally efficient with all of them; additionally, there are some fields that Rubrik straight-up cannot work with, such as Azure cloud storage.
  • Recent security breaches have opened questions about the security of Rubrik’s overall architecture.

Pricing (at the time of writing):

  • Rubrik does not provide pricing information on its official website. To obtain pricing information, one needs to contact the company directly for a personalized demo or one of the guided tours.

My personal opinion on Rubrik:

Rubrik provides a rather interesting solution for information management and data backups. It is surprisingly scalable, supporting both large and small storage infrastructures, as well as plenty of different storage types – databases, disks, tape, cloud, etc. It can be used to create complex policies to manage different storage types and environment variations, making it an excellent option for large-scale hybrid environments. It is not the cheapest solution on the market, and it has plenty of issues that are worth inspecting beforehand, but the total package is still more than worth it for many potential businesses.

Commvault

Commvault serves as a sophisticated interconnected web of capabilities and features, covering backup and recovery tasks, data management, and data security. Commvault Cloud (the flagship solution of the company) also supports Oracle in multiple ways – including Oracle data backups and integration with Oracle RMAN, offering both the security and convenience of using near-native backup and recovery tools. Other capabilities of Commvault in terms of Oracle integration include easy data mobility, improved security, and eliminated data sprawl.

Customer ratings (at the time of writing):

  • Capterra4.6/5 points based on 38 customer reviews
  • TrustRadius8.0/10 points based on 221 customer reviews
  • G24.3/5 points based on 138 customer reviews

Advantages:

  • Commvault boasts a large number of supported software types and configurations.
  • It can be integrated with many other solutions in the same field.
  • Configuring backup and recovery processes is not a difficult process.

Shortcomings:

  • The first-time setup process is highly complicated and challenging to perform for most non-expert users.
  • Commvault’s logging capabilities are extremely basic and are missing straight-up in some cases.
  • The overall solution has a steep learning curve; it might take a while for an average user to grasp all the features and capabilities.

Pricing (at the time of writing):

  • Commvault does not offer pricing information to the public; the only option to receive such information is to contact the company directly.

My personal opinion on Commvault:

Commvault is a backup solution that caters to the backup requirements of big organizations. It implements advanced technologies to provide an outstanding user experience. The software can handle different storage options such as cloud storage, databases, VMs, containers, and endpoints, delivering quick and precise backup and recovery features. However, integrating Commvault with cloud storage providers can be costly. Additionally, some of its functionalities do not offer sufficient logging and reporting information, and setting up the software initially can be a complex and time-consuming process.

Additionally, one more third-party backup solution is worth considering in the context of Oracle backup and recovery tasks. The solution is called Bacula Enterprise.

Oracle Backup and Recovery with Bacula Enterprise

bacula enterprise landing page

Bacula Enterprise is an especially secure software solution offered by Bacula Systems that provides comprehensive backup and recovery capabilities. What sets it apart is its unique approach to expanding its own functionality within the same software, thanks to a highly secure modular system implemented by Bacula. This software offers a wide array of features such as advanced backup levels, deduplication and compression, different user interfaces, advanced volume and pool management, Job Control, endpoint features like Bare Metal Recovery for Linux and Windows systems, and Client-Initiated Backup. Because of its unusually high security levels, Bacula tends to be used by security-conscious government organizations, and defense and research institutions.

Additionally, it provides Snapshot technology, features for MSP and Hosting companies, and customizable protection for Microsoft 365 and other SaaS applications. Bacula is compatible with various storage formats, including physical, public, and private cloud, and it works with almost all tape technology. It also covers containers, VMs, and databases of many different kinds.

Customer ratings:

  • TrustRadius9.7/10 points based on 54 customer reviews
  • G24.7/5 points based on 56 customer reviews

Advantages:

  • Plenty of features out of the box and a built-in module system that can provide even more capabilities.
  • Multiple security-oriented options for its data backup efforts, including encryption, backup verification, and more.
  • The support for many different storage types and infrastructure variations offers the capability to work with databases, servers, VMs, cloud storage, and physical storage.

Shortcomings:

  • Bacula’s own web interface, BWeb, might be somewhat confusing to newcomers due to the sheer number of features available from the start.
  • The initial setup process for more complex infrastructures may take a while to complete.
  • Some of the more specific plugins and modules are not included in the base Bacula subscription and have a separate price tag.

Pricing:

  • To obtain exact pricing data for Bacula, it is necessary to contact Bacula Systems directly because no public information about Bacula’s pricing is available on its official website.
  • However, the website does provide some information about Bacula’s pricing model.
  • Several pricing tiers are available, including BSBE, Standard, Bronze, Silver, Gold, and Platinum. The biggest difference is the number of clients and contracts one can work with using a specific subscription tier.

Performing Oracle backups with Bacula Enterprise:

A data backup is, essentially, a copy of your important data that you’re keeping separately from the original to restore it in case of all kinds of data loss. Any business has some sort of data that they need to protect and don’t want to lose – that includes Oracle database users, as well. Data loss is the main reason why you need to have a backup to keep your Oracle database environment reliable and secure.

Most of the companies using Oracle prefer to have a separate person to manage their Oracle backup operations – this position is called a “backup administrator”. Typically, this person would be tasked with a number of duties, including:

  • Working out a proper backup schedule;
  • Being ready to solve problems that can arise in relation to the whole backup and recovery process;
  • Thinking through and testing different situations with different kinds of possible hardware or software failures related to data loss;
  • Data preservation and data transfer tasks;
  • Unexpected data loss events leading to sudden need in data recovery processes.

Speaking of Oracle database loss, the wide variety of possible reasons for the loss of the database further illustrates that doing Oracle backups is a good thing in general! For example, some of the various causes of data loss could be:

  • Hardware crash;
  • Accidents with mishandling data;
  • Data corruption because of a virus;
  • Errors in the process of data migration from one device or system to another, etc.

There are many ways to backup Oracle databases. Clustered modes provide resilience to hardware issues, and highly available, cloud, and converged infrastructures offer new options for data assurance and freedom along with redundancy. Regardless of these options, Oracle backup remains critical in order to ensure that a small mistake, corruption, or hack doesn’t destroy the critical data residing on even the best infrastructure. Database servers remain a key component of most organizations and often contain the most critical information for the continuity of operations. The guide that follows will show you how to execute Oracle backup and recovery using RMAN’s SBT functionality, which allows data to stream directly to Bacula Enterprise.

Possible Types of Oracle Backup and Recovery

There are two methods to backup the Oracle database:

  • Bacula managed backup using Oracle dump mode. This is quick and easy to set up, but is limited in scope to smaller databases and does not support point-in-time recovery or incremental backups.
  • RMAN managed backup (Oracle SBT mode). Also known as Oracle Recovery Manager (RMAN), it is an original Oracle database server feature, meaning there’s no need to install it manually – it’s already included on the server side. This mode uses the excellent RMAN backup tool and APIs to allow Bacula to initiate more advanced backup modes that support PITR, incremental and differential database backups, and can take advantage of RMAN’s change tracking feature to improve incremental backup performance. It’s also the most user-friendly since RMAN uses one interface for all of the operating systems, which makes it a lot less complicated.

Since RMAN-based backup type is the preferred solution, here are some of the most noticeable advantages of using it:

  • Binary compression. This type of compression mechanism is integrated into the Oracle database as a system, and its main purpose is to reduce the overall size of an average backup.
  • Automated database duplication. A number of features implemented in Oracle allow for easy creation of your database’s copy using a large number of storage configurations.
  • Incremental backups. This type of backup is keeping and backing up only those blocks that were changed in some way since the last full backup. This backup approach requires far less storage space than the traditional one and adds more flexibility to the restoration process in case of some sort of disaster.
  • Encrypted backups. RMAN can easily encrypt your database using the integrated backup encryption capability. There’s one distinction between creating such a backup on a disk and creating that same backup directly on a tape. For disk – the database in question much enable the Advanced Security Option. For tape – RMAN has to use Oracle SBT interface but there’s no need for Advanced Security Option to be enabled.
  • Block media recovery. If the amount of corrupt data is relatively small, you don’t really need to restore the entire backup to fix it – this feature is called block media recovery and can be used without taking the file itself offline, as well.

For this how-to, we’ll be setting up Oracle SBT backups.

Part 1: Configure the Oracle backup and recovery plugin in Bweb

Step 1. In Bweb, configure a new fileset for the job. In the ‘Plugin’ tab on the fileset, select Oracle SBT.

backup oracle database

Step 2. The Oracle backup and recovery plugin is configured primarily on the client side, so in most cases no further configuration is required on in Bweb. The new fileset can be committed.

oracle backup and recovery

Step 2a: Please note the different options to backup Oracle database available if the Oracle plugin (non-SBT) is chosen. The Oracle Plugin Whitepaper covers these alternate methods in depth.

oracle backup

Part 2: Configure the Oracle Database Backup Plugin on the Oracle server

As with other database plugins, the Bacula Enterprise File Daemon and the relevant database plugin component (Oracle SBT in this case) must first be installed on the database server. This places the necessary tools for Bacula backup onto the database server. Please review the Oracle whitepaper or contact Bacula Systems support if you need help with this step.

Step 1: Install the Bacula File Daemon and the Oracle backup plugin packages

Step 2: Install the sbt library into Oracle

/opt/bacula/scripts/install-sbt-libobk.sh install

Step 3: Restart oracle

Step 4: Copy bconsole and make sure Oracle can read it:

cp /opt/bacula/bin/bconsole /opt/bacula/ oracle
cp /opt/bacula/etc/bconsole.conf /opt/bacula/oracle
chown oracle:dba /opt/bacula/oracle/bconsole*
chmod go-rxw /opt/bacula/oracle/bconsole*

Step 5: Edit /opt/bacula/etc/sbt.conf to indicate the job name, bconsole path and configuration, and client name:

client=oracle-fd
job=OracleBackup
bconsole=”/opt/bacula/oracle/bconsole -n -c /opt/bacula/oracle/bconsole.conf”

Fileset and Job examples:

Below are examples of the simple fileset configured in BWeb in Part 1, and a sample job that uses this fileset. For in-depth Bweb tutorials, please see the Bacula Systems video documentation:

FileSet {
Name = SBT-FileSet
Include {
Options {
Signature = MD5
}
Plugin = oracle-sbt
}
}

Job {
Name = SBT-Backup
FileSet = SBT-FileSet
Client = oracle-fd
Maximum Concurrent Jobs = 10
Messages = Standard
Pool = Default
Storage = File
}

Part 3: Test Plugin Connectivity and Run Oracle Backup:

Step 1: Test the plugin

/opt/bacula/scripts/install-sbt-libobk.sh test

Step 2: Manually run a backup through RMAN:

RUN {
ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
ALLOCATE CHANNEL c2 DEVICE TYPE sbt;
ALLOCATE CHANNEL c3 DEVICE TYPE sbt;
BACKUP INCREMENTAL LEVEL 0 DATABASE plus archivelog;
}

A typical successful RMAN backup output looks like below, and is an indication that the SBT plugin is installed, correctly configured, and ready to run backups:

[oracle@centos07 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 – Production on Thu Mar 23 11:02:22 2017

Copyright (c) 1982, 2015, Oracle and/or its affiliates. All rights reserved.

connected to target database: CENTOS07 (DBID=2213460080)

RMAN> run {

2> allocate channel c1 type sbt;

3> backup database plus archivelog;

4>}

using target database control file instead of recovery catalog

allocated channel: c1

channel c1: SID=44 device type=SBT_TAPE

channel c1: Bacula Enterprise Oracle SBT Plugin 1.0.0.7

Starting backup at 23-MAR-17

current log archived

channel c1: starting archived log backup set

channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=23 RECID=1 STAMP=894837644
input archived log thread=1 sequence=24 RECID=2 STAMP=894882191
input archived log thread=1 sequence=25 RECID=3 STAMP=894882226
input archived log thread=1 sequence=26 RECID=4 STAMP=894924027
input archived log thread=1 sequence=27 RECID=5 STAMP=912953744
input archived log thread=1 sequence=28 RECID=6 STAMP=912955548
input archived log thread=1 sequence=29 RECID=7 STAMP=912955554
input archived log thread=1 sequence=30 RECID=8 STAMP=912955561
input archived log thread=1 sequence=31 RECID=9 STAMP=912955564
input archived log thread=1 sequence=32 RECID=10 STAMP=912964429
input archived log thread=1 sequence=33 RECID=11 STAMP=939375680
input archived log thread=1 sequence=34 RECID=12 STAMP=939380476
input archived log thread=1 sequence=35 RECID=13 STAMP=939380575

channel c1: starting piece 1 at 23-MAR-17

channel c1: finished piece 1 at 23-MAR-17

piece handle=07rvrjqv_1_1 tag=TAG20170323T110255 comment=API Version 2.0,MMS Version 1.0.0.7

channel c1: backup set complete, elapsed time: 00:00:25

Finished backup at 23-MAR-17

Starting backup at 23-MAR-17

channel c1: starting full datafile backup set

channel c1: specifying datafile(s) in backup set

input datafile file number=00001
name=/u01/app/oracle/oradata/CENTOS07/datafile/o1_mf_system_c2kyrs39_.dbf

input datafile file number=00003
name=/u01/app/oracle/oradata/CENTOS07/datafile/o1_mf_sysaux_c2kyqoql_.dbf

input datafile file number=00004
name=/u01/app/oracle/oradata/CENTOS07/datafile/o1_mf_undotbs1_c2kyt7s9_.dbf

input datafile file number=00006
name=/u01/app/oracle/oradata/CENTOS07/datafile/o1_mf_users_c2kyt6j4_.dbf

channel c1: starting piece 1 at 23-MAR-17

channel c1: finished piece 1 at 23-MAR-17

piece handle=08rvrjrp_1_1 tag=TAG20170323T110321 comment=API Version 2.0,MMS Version 1.0.0.7

channel c1: backup set complete, elapsed time: 00:00:56

channel c1: starting full datafile backup set

channel c1: specifying datafile(s) in backup set

including current control file in backup set

channel c1: starting piece 1 at 23-MAR-17

channel c1: finished piece 1 at 23-MAR-17

piece handle=09rvrjth_1_1 tag=TAG20170323T110321

comment=API Version 2.0,MMS Version 1.0.0.7

channel c1: backup set complete, elapsed time: 00:00:03

Finished backup at 23-MAR-17

Starting backup at 23-MAR-17

current log archived

channel c1: starting archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=36 RECID=14 STAMP=939380664

channel c1: starting piece 1 at 23-MAR-17 channel c1: finished piece 1 at 23-MAR-17

piece handle=0arvrjto_1_1 tag=TAG20170323T110424 comment=API Version 2.0,MMS Version 1.0.0.7

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 23-MAR-17 released channel: c1

Oracle Database Recovery

While a backup on its own is incredibly important – it’s also worth mentioning that the  recovery functions are, of course, a vital part of the whole process in the Oracle database backup and recovery cycle. Just having a backup with no means to restore is of no use to anyone.

But first we have to cover some basics. As we said earlier, there are a large number of possible circumstances that could leave you needing to recover your database. For example, these could be a number of various hardware failures and firmware issues:

  • Block corruption;
  • Data loss;
  • User error;
  • Issues with upgrading;
  • Natural or unnatural disaster.

You’ll have to connect to the recovery catalog first if you want to either restore or recover a database using RMAN. The next step is to allocate channels to either tape or disk. The purpose of recovery catalog is to provide all kinds of information about database backup or backups. You can also configure a separate control file for similar purposes. The difference between restore and recover commands is that “restore” does exactly what you’d expect – restores database files, but “recover” is somewhat different since it applies all of the changes recorded in the archived data logs.

Oracle database backup and recovery as a process is able to provide several recovery options, including:

  • Specific Point Recovery

When you’re using Oracle, the recovery process is not so complicated. You can easily restore the entire database and after that, use “recover” commands to choose the specific point to which you want your database to be recovered. There are also several other options included aside from the complete recovery if you’re using RMAN – you can bring the state of your database to a specific point in time, or you can match its condition to a specific archive log.

  • Tablespaces/Datafiles/Blocks Restoration

If your database includes a lot of tablespaces – you can choose this recovery mode to limit the database downtime only to tablespace users that were using now damaged files. In general, restoring tablespaces is a bit more complicated than the usual restore database function since you can’t recover specific tablespace after the restore. That’s why a backup is advised straight after restoring those tablespaces. One more specific when using RMAN is that you’ll be able to provide both block number and datafile number, thus making the recovery process easier.

  • Data Recovery Advisor

Oracle’s service also includes a feature called Data Recovery Advisor which you can bring up if you’re having problems with one or several of your database files. This advisor is able to provide you with both the repair script based on your database and can show you how much you can recover in your current situation, as well. You can also quite easily enable the provided script right after launching the advisor.

However, Oracle backup management is not just about keeping up your retention policy, it can also be used to keep track of which backups you can use for restore operations at a given moment. There are several approaches to this task:

The first approach is strictly for retrieving a list of available backups, and it can be done with little to no effort with a LIST command that RMAN has. This particular command retrieves a table of backup sets with additional information about each of those, such as the creation date, the backup type, the specific parts of a database that were copied, and more.

The second approach to Oracle backup management is centered around getting rid of obsolete files – it is mostly controlled by only two parameters (RECOVERY WINDOW and REDUNDANCY, for number of days for a retention policy and number of backups, respectively), and consists of three possible options:

  • Expire. Controlled by REDUNDANCY and RECOVERY WINDOW,  usually a part of a backup script or backup job with an EXPIREDATE parameter.
  • Delete from the catalog. Backup history gets deleted with a chance for recovery if it was accidental or if the data in question is needed.
  • Delete expired. A routine cleanup task that deletes obsolete backups and archive logs.

While the majority of Oracle backup operations deal with backups of the entire database, the option to restore specific objects is also on the table so that any object within your system can be backed up or recovered separately from the rest at any given moment. As with the previous topic, there are several ways to approach the subject:

  • Oracle Data Pump. Data Pump is an Oracle utility that can provide both export and import of specific objects or tables. It is worth noting that the DDL (Data Definition Language) is also included, meaning that the entire structure of the table or procedure in question would be recreated with the object or table that is being restored. This can also be used to restore just the structure with zero data in it to be used as a template or a backup measure.
  • Using Table/Schema levels to copy specific objects. Singular tables can be recovered within Oracle using the CREATE command; it will include tablespaces with no logging – meaning that you’ll only be able to restore data without any of the structures, such as indexes, triggers, constants, etc.

Final Thoughts on Oracle Backup and Recovery

Because the Bacula Enterprise Oracle SBT plugin leverages RMAN for advanced backup features, some additional configuration must be done in Oracle.

Retention period:

When using the RMAN SBT plugin, the backup retention defined in RMAN should match the Bacula volume or job retention.

Archive log:

In order to use the RMAN backup mode, the database must be in ARCHIVELOG mode.

Disaster recovery in Oracle

Disaster recovery planning is a necessity for any strategy that revolves around Oracle database management where critical data is concerned. Making sure that the database would be able to recover with speed and efficiency if necessary after a problematic event is the primary goal of a related DR strategy. Most of the elements that we have mentioned before should be included in an effective DR plan, be it system redundancy, backup regularity, and a properly documented information recovery procedure.

Regular use of RMAN for backup management is one of the biggest “pillars” of disaster recovery in Oracle since it can offer a multitude of capabilities and advantages that greatly simplify information recovery processes. It can even be integrated with various off-site storage locations to protect backups stored there, as well.

A standby database strategy would be a great addition to the existing disaster recovery efforts. For example, Oracle Data Guard can be used to create and keep a synchronized copy of all the information from the primary database in an offsite storage location in a separate geographic location. It can be configured in several different ways, depending on a company’s RTO and RPO requirements (to prioritize performance, protection, or availability).

Regular disaster recovery test runs are also highly recommended to identify potential weak spots and issues with the strategy. That way, all of them can be solved before an actual disaster hits. Additionally, DR drills are necessary to check practical plans, such as whether all of the necessary staff members are aware of the proper recovery procedures.

A resilient DR framework includes a combination of thorough testing, standby databases, and properly configured regular backups. It is the only way to ensure business continuity after the majority of potential disruptions or unfortunate events while minimizing data loss and general downtime.

Recent developments and updates of Oracle

Oracle itself is a rapidly developing technology that regularly rolls out new features and capabilities. Two of the most recent developments of Oracle as a whole are the Oracle Enterprise Communications Platform and a generative AI service called Oracle Cloud Infrastructure

Oracle Enterprise Communications Platform acts as a centralized hub that connects Oracle’s applications with other communication channels – be it social media platforms, IoT devices, or traditional networks. The platform in question streamlines communication and improves overall efficiency while offering a better customer experience and a transparent view of the entire communications pipeline. The latest article on the topic of ECP can be found here.

Oracle Cloud Infrastructure Generative AI Service offers Oracle’s take on the generative AI power, providing its customers with capabilities to perform machine translations and content generation in the form of videos and images, as well as a multitude of text formats the model can work with. The service in question now powers the Oracle Health Data Intelligence – a combination of applications, services, and analytical tools built specifically for the healthcare industry. The article on this particular topic can be found here.

Oracle’s technical side is just as active, providing security upgrades and critical patches. The next critical patch is planned to be released on April 16th, 2024. More information about the “security”-oriented information about Oracle can be found here.

Best practices and common issues for Oracle backup and recovery operations

Best practices of Oracle backups

Oracle backup operations have plenty of their own unique aspects and details, but the majority of best practices for these types of backup operations are very similar to what someone would recommend for regular backup operations. Here are a few examples:

  • Backup performance monitoring.
  • Testing for both backup and recovery procedures.
  • Consistent backup schedule based on the company’s needs in terms of RPOs and RTOs.
  • Data encryption as a mandatory element of a backup strategy.
  • RMAN-based backup and recovery tasks are highly recommended.
  • Keep and monitor the creation of documentation for all the backup procedures.

This list is far from exclusive, but it should provide enough of an example of how most of the best practices for Oracle backup tasks are very similar to how most backups work in general.

Common issues with Oracle backups

Issues are not that uncommon for Oracle backups, they can arise even in the most thought-out scenarios. The list below goes over some of the most mundane examples of troubles that Oracle might encounter before, during, or after the backup process:

  • Backup corruption
    Backup data is found to be incomplete or corrupt before or during the restoration attempt.
    Here is what can be done to troubleshoot this situation:

    • Regularly conduct test restoration processes to make sure that the commands are correct and the data is safe.
    • Check the integrity of backed-up data on a regular basis using RMAN’s VALIDATE command. It should look like the following example:
      VALIDATE BACKUPSET [backupset_number];
  • RMAN configuration issues
    Backup inefficiencies or even failures can be the result of an incorrect RMAN configuration.
    Here is what can be done to troubleshoot this situation:

    • Some of the best recommendations in terms of configuring RMAN parameters can be acquired by consulting the official Oracle documentation.
    • Conduct regular reviews of current RMAN configuration to make sure that they fit your current environment and priorities.
  • Insufficient backup performance
    Situations when backups take longer than usual to complete, exceeding maintenance windows, disrupting regular operations, and leading to a number of other issues.
    Here is what can be done to troubleshoot this situation:

    • If the backup processes are performed over a network, it is worth checking whether the current network bandwidth is sufficient for all the company’s tasks or not.
    • Check if the RMAN is configured to perform parallel backups.
    • Analyze the current backup configuration, including the correct backup block size, and see if you can swap the current storage devices for high-performance ones.
  • Extreme CPU usage during backup processes
    The CPU consumption of the backup process is so high that it affects the performance of the rest of the database, including mundane day-to-day operations.
    Here is what can be done to troubleshoot this situation:

    • Schedule backups to be performed outside of the peak hours to reduce the impact to the production workloads.
    • Experiment with backup compression algorithms, make sure that you can find the balance between compression efficiency and CPU usage, if possible.
  • Failure of backup operations
    Multiple factors can contribute to the backup process failing before it is completed, including permissions issues, data corruption, or even insufficient storage space.
    Here is what can be done to troubleshoot this situation:

    • Check RMAN logs for error messages; this can be done to narrow the scope of potential issues and their resolution methods.
    • Make sure that there is enough free storage space on the backup target storage medium.
    • Check whether the Oracle user has the permissions to perform backup tasks, namely the permission to write to the backup target location.

Final Thoughts on Oracle Backup and Recovery

Oracle databases are sophisticated enough on their own, and the topic of performing correct database backups can be just as complex in comparison. This article went over multiple aspects of Oracle backups, including definitions, backup types, built-in capabilities, third-party options, and even examples of how specific operations work.

An average Oracle backup may include one or several elements in the process, including:

  • Online (hot) backups. Only possible for up-and-running databases, includes plenty of nuances and risks.
  • Offline (cold) backups. Can only be performed when the database is turned off.
  • Import and export backups. The logical part of the backup task (serves as a record of where every single database element is stored), as a counterpart to the physical backups that most third-party solutions make (back up every single part of the database).
  • RMAN backups. Handles most of the backup operations with Oracle; it is a preferred backup method for most conventional situations.

While backup of complex Oracle environments can be challenging to work with, the importance of backup and recovery processes for Oracle databases in enterprise environments cannot be understated – which is why backups are usually a necessity and not a recommendation.

Please consult Bacula’s Oracle Backup whitepaper and Bacula Systems Support if you need more information, assistance, or have questions after reading this Oracle backup and recovery guide.

About the author
Rob Morrison
Rob Morrison is the marketing director at Bacula Systems. He started his IT marketing career with Silicon Graphics in Switzerland, performing strongly in various marketing management roles for almost 10 years. In the next 10 years Rob also held various marketing management positions in JBoss, Red Hat and Pentaho ensuring market share growth for these well-known companies. He is a graduate of Plymouth University and holds an Honours Digital Media and Communications degree, and completed an Overseas Studies Program.
4 Comments
  1. Adam
    Adam

    I used to think that it’s hard to backup oracle database. But with Bacula plugin it’s easier that ever to do oracle backup and recovery. Also you can look through Bacula oracle backup whitepaper to learn more details.

  2. George
    George

    That’s a great step-by-step oracle backup and recovery tutorial with the definition of oracle backup types.
    If you want to backup oracle database you should check this post. Just follow the steps or contact support if necessary.

  3. Gary
    Gary

    Oracle backup is a surprisingly complicated process that might seem too sophisticated for some people. This article did a great job in describing all of the necessary steps with a lot of details.

  4. Kaylee
    Kaylee

    With an Oracle backup and recovery process this complicated – we’re lucky to have RMAN with its unified interface capability. It’s hard to imagine an Oracle backup process with several different interfaces that you need to get through every time.

Leave a comment

Your email address will not be published. Required fields are marked *