The following is an example of a Non Mutli-Tenant database restore script. This is intended only as an example and lacks any internal error checking and correction.

The restore script can be used as a pre-snapsync hook script to automatically restore the backups prior to the snapsync.

The example assumes that the backup directory contains:

  • Autobackup controlfile.

  • Full or incremental database backups.

  • Backup of all required archived logs.

Full backup script example:

run { 
  CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE disk TO '/backups/%F'; 
  CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/backups/%U'; 
  BACKUP INCREMENTAL LEVEL 0 AS BACKUPSET DATABASE TAG='FULL_BACKUP'; 
  BACKUP AS BACKUPSET ARCHIVELOG ALL TAG='ARC_BACKUP'; 
} 

Incremental backup script example:

run { 
  CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE disk TO '/backups/%F'; 
  CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/backups/%U'; 
  BACKUP INCREMENTAL LEVEL 1 AS BACKUPSET DATABASE TAG='INC_BACKUP'; 
  BACKUP AS BACKUPSET ARCHIVELOG ALL TAG='ARC_BACKUP'; 
} 

Restore script example:

Download the following .bash script:
staging_push_non_mt_restore_script.bash

Last updated
Oct 9, 2026