How to change default backup location for oracle11g using RMAn


I want to change to another drive due to lack of disk space.

How can I change the default location of backup files used by oracle to another drive using RMAN?

By default it's in the folder ORACLE_HOME from variables.


Found some links with problems like mine here, but they didn't help.

My script looks like this one:

run {
allocate channel d1 type disk;
allocate channel d2 type disk;
format 'd:/backups/%U.bkp'
database plus archivelog;
release channel d1;
release channel d2;

Edit : By running the above scripts the backup will never finish

Best Solution

If performing a BACKUP operation with RMAN, the location of backupsets / backup pieces / image copies / etc is determined by the ALLOCATE CHANNEL command.

  allocate channel d1 device type disk format 'd:/backups/%U.bkp';
  backup database include current controlfile;
  release channel d1;

If not specifying a location for a disk channel, Oracle defaults the location to $ORACLE_HOME, as that's a path Oracle knows exists.

Related Question