DBAtlas · Database operations atlas

Quick full backup with RMAN

OracleMaintenance

Command

# From the shell: rman target /
RUN {
  ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
  ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
  BACKUP AS COMPRESSED BACKUPSET
    DATABASE
    PLUS ARCHIVELOG
    TAG 'FULL_DAILY';
  BACKUP CURRENT CONTROLFILE;
  DELETE NOPROMPT OBSOLETE;
  RELEASE CHANNEL c1;
  RELEASE CHANNEL c2;
}

What it does

Takes a compressed full backup of the whole database and archive logs in parallel over two channels, backs up the controlfile and purges obsolete backups.

When to use it

Daily/weekly full backup, to create a recovery point.

Caution

COMPRESSED uses CPU. DELETE OBSOLETE removes old backups according to the retention policy; set the policy (CONFIGURE RETENTION POLICY) correctly. ARCHIVELOG requires the DB to be in ARCHIVELOG mode. Make sure the backup destination has enough space.

Open in DBAtlas →

Related