Site icon IT Tutorial

How to Distribute the RMAN Backups for Multiple Disks in Oracle

I will explain How to Distribute the RMAN Backups for Multiple Disks in Oracle in this post.

 

Distribute the RMAN Backups for Multiple Disks

You can read the following post if you want to learn more details about Oracle RMAN.

Introduction to Oracle RMAN | Oracle RMAN ( Recovery Manager ) Backup Tutorials -1

 

 

 

Sometimes you may need to distribute the RMAN Backups to multiple disks or mount points for IO Performance or Capacity problem on Disks.

Normally if you have one disk or mount point like /backup and there is enough capacity for backups, you can start the backup as follows.

run{
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH2 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH3 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH4 DEVICE TYPE DISK;
BACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT '/backup/FULL_%d_%u_%s_%T.bkp';
BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL FORMAT '/backup/Archivelogs_%d_%u_%s_%T.bkp';
BACKUP CURRENT CONTROLFILE FORMAT '/backup/CONTROLFILE%d_%u_%s_%T.bkp';
RELEASE CHANNEL CH1;
RELEASE CHANNEL CH2;
RELEASE CHANNEL CH3;
RELEASE CHANNEL CH4;
}

 

Allocate Channel Disk Format

But for example;  If you have 4 different disks or mount points like /backup1,/backup2,/backup3,/backup4,  you can distribute the backups accross to these disks. You can use the allocate channel disk format as follows.

run{
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK format '/backup1/%U';
ALLOCATE CHANNEL CH2 DEVICE TYPE DISK format '/backup2/%U';
ALLOCATE CHANNEL CH3 DEVICE TYPE DISK format '/backup3/%U';
ALLOCATE CHANNEL CH4 DEVICE TYPE DISK format '/backup4/%U';
BACKUP AS COMPRESSED BACKUPSET DATABASE;
RELEASE CHANNEL CH1;
RELEASE CHANNEL CH2;
RELEASE CHANNEL CH3;
RELEASE CHANNEL CH4;
}

 

Or you can use the CONFIGURE CHANNEL DEVICE TYPE DISK instead of Allocate channel as follows.

 

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup1/%U', '/backup2/%U','/backup3/%U','/backup4/%U';

 

 

 

You can run the backup database as follows.

run{
ALLOCATE CHANNEL CH1 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH2 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH3 DEVICE TYPE DISK;
ALLOCATE CHANNEL CH4 DEVICE TYPE DISK;

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup1/%U', '/backup2/%U','/backup3/%U','/backup4/%U';
BACKUP AS COMPRESSED BACKUPSET DATABASE;
RELEASE CHANNEL CH1;
RELEASE CHANNEL CH2;
RELEASE CHANNEL CH3;
RELEASE CHANNEL CH4;
}

 

 

 

Do you want to learn more details about RMAN, then Click this Link and read the articles.

 

Exit mobile version