Skip to content
DBA Brain
Oracle RMAN backup validation

Every Oracle RMAN backup proven by restoring it

An RMAN backup that has never been restored is a hope. DBA Brain, an open-source DBA tool, takes RMAN level 0 and level 1 backups and archived logs, validates each one, keeps a proven copy away from the database host, and duplicates the database on a schedule into a separate instance - opened, checked with RMAN VALIDATE CHECK LOGICAL, and recorded piece by piece.

What every backup is held to

Six checks between an RMAN backup and a restore you can trust

Validated by RMAN

RMAN VALIDATE BACKUPSET on every set the run wrote, as soon as it ends, on the instance the entry names by its SID. Old backups go by RMAN's own recovery window, never by file age - which could cut a level 0 its level 1s need.

Hashed at the source

SHA-256 and size in bytes of every backup piece, taken on the database host and stored in a catalog on another host. The first hash can never be changed, not even by a direct UPDATE.

Archived logs, minutes old

An archivelog job of its own, every 15 minutes as registered, backs up the archived logs with the control file and SPFILE, so the newest copy of each is minutes old. A log is deleted only once it has been backed up.

Copied off the host

To a Linux repository over SSH, in the same pass, compared by checksum and bytes - and, if you choose, encrypted there with age, so the repository cannot read what it holds.

Duplicated on a schedule

RMAN DUPLICATE ... BACKUP LOCATION into a separate instance, to the latest backup or a point in time the archived logs cover. The chain each run recorded is the one copied, and a missing piece is refused by name before anything moves.

Opened and checked

A restore counts only when the new database opens, answers a real query, was created by this run, and passes VALIDATE CHECK LOGICAL with no row in v$database_block_corruption (on unless the entry sets checkdb off).

How a drill runs

From the backup to the proof, one message per step

Each step is said as it happens - in Telegram for the steps the entry's notify sends there, and in the run's record - so a failure names the step it stopped at, and why.

  1. Back uplevel 0 or level 1, validated by RMAN and hashed, its chain recorded
  2. Archive logsevery 15 minutes, with the control file and SPFILE
  3. Copyto the repository, proven by checksum and bytes
  4. RestoreRMAN DUPLICATE from the recorded chain, to the latest or the moment asked
  5. Checkopen the database, answer a query, run VALIDATE CHECK LOGICAL
  6. Recordevery piece applied, in order, on the backup and server pages
Why RMAN VALIDATE is not enough

A backup set that reads clean is not yet a database that opens

RMAN VALIDATE BACKUPSET reads the backup pieces and checks them for corruption. It restores nothing: it cannot show that the chain - the level 0, its level 1s, the archived logs - reaches the moment you will need, that a database opens from it, or that its blocks are logically sound. A duplicate that opens, answers a query and passes VALIDATE CHECK LOGICAL can - which is why DBA Brain runs both, and keeps the record of each.

Try it

Install, get a key, describe the backup and the restore

Backup and restore need a free dbabrain key - an email sign-in, 14 days, renewed with one command (what a key is).

shell
pip install "dbabrain[oracle,ssh]"
dbabrain init
dbabrain key-request

Then a database backup entry, an archivelog entry and a restore entry, each field stated: the backup and restore reference, and everything else DBA Brain does.

FAQ

Questions asked first

Does it install anything on the Oracle server?

No agent. DBA Brain runs on a machine of its own and runs its RMAN scripts on the database host over SSH - inside the instance's container or on the host itself. Each run applies the RMAN CONFIGURE settings it relies on, which RMAN keeps in the control file; an entry with RMAN_CONFIGURE set to skip leaves the database's own.

Does a drill touch the production database?

No. DUPLICATE ... BACKUP LOCATION builds a new database, with its own DBID and file paths, from the backup pieces alone - it needs no connection to the source instance. The drill then checks that the database it reads was created by this run, so a stale target cannot pass for a restore.

Can it restore to a point in time?

Yes, wherever the archived logs cover the moment: the duplicate runs with SET UNTIL TIME, from the newest level 0 before it and the runs after it. The pieces it applied are recorded in order.

What about SQL Server and PostgreSQL?

The same loop: FULL, DIFF and LOG with RESTORE VERIFYONLY and DBCC CHECKDB on SQL Server (SQL Server backup verification), base backups and WAL with pg_verifybackup and pg_amcheck on PostgreSQL (PostgreSQL backup verification). Backups for MySQL are not in this version.

Can someone set it up for us?

Yes - setting up DBA Brain on your servers, and backup and restore work in general, are among the DBA work we do: see what we do.