Back up and restore Oracle Database
RMAN online backups with archive logs, restore to any second, even when the database is lost.
The agent backs up Oracle with RMAN, Oracle's own backup tool, while the database stays open. Every restore point is a normal set of RMAN backup pieces, stored encrypted in Beyond Cloud Vault.
Supported: Oracle Database 19c and newer on Linux, every edition including Free, with container databases (CDB with PDBs) and non-CDB databases alike. Each database in /etc/oratab, and any running instance, is found automatically. Nothing else to install: the agent uses the RMAN and SQL*Plus of your Oracle home, as the home's owner (usually oracle), connected / as sysdba.
1. Check the database on the Databases page
- Install the agent on the database server (Install on Linux).
- Open Beyond Cloud Backup → Databases. The Oracle card shows the version, the DBID, the size, the open mode and the PDBs, with connected.
If the card shows an error, check that the database has a line in /etc/oratab (SID:ORACLE_HOME:N) and that it is running.
2. ARCHIVELOG mode (needed for online backups)
Online backups and restoring to an exact moment need the database in ARCHIVELOG mode. The card shows ARCHIVELOG or NOARCHIVELOG. To switch, as oracle in SQL*Plus / as sysdba (the database restarts):
shutdown immediate;
startup mount;
alter database archivelog;
alter database open;
3. Create the backup
- Go to Backup → the Oracle card → Create backup. The whole database is protected (with every PDB).
- Schedule: Full every day at 22:00 and Archive log every 15 minutes is a good start.
- Choose retention and Save.
A Full backup is the database, the archive logs, the control file and the spfile. An Archive log backup stores the archive logs written since the previous backup, plus the control file.
4. Restore
Open Restore → the Oracle card, choose the database and a restore point (or A point in time, to the second), then:
- Whole database: replaces the database on this server: RMAN restores the control file and the data files and applies the archive logs up to the chosen moment, then opens the database with
RESETLOGSand opens the PDBs. Tick Replace the database to confirm. - Backup files to a folder: the RMAN backup pieces with
restore.rman, the script that restores them, to run yourself withrman target / cmdfile=restore.rman.
When the database is lost completely (data files, control files and spfile deleted, or the server reinstalled), choose Whole database as well. The agent restores the spfile from the backup, creates the missing folders (owned by the Oracle home's owner), and rebuilds the database. On a reinstalled server, first put back the Oracle software, the same version, and the database's line in /etc/oratab.
Good to know:
- Restoring under a new name, or on another server from this one's backups, isn't available yet; ask support if you need it.
Good to know
- Backups are written to
/var/lib/beyondcloud-oraclefirst, then stored in the Vault and removed. Leave free space there about the size of the data in your database. - Archive logs already backed up and older than one day are deleted from the server after each backup, so the archive destination doesn't fill up.
- Don't run another tool's RMAN backups that delete archive logs on the same database: the archive log chain would break.