How to Change RMAN backup location
If you want to change your database RMAN Backup configuration please follow below steps:
NOTE: Database must be in archivelog mode.
If database not in archive log mode put the database archive log mode first.
1-Create RMAN Backup location directory structure-
mkdir -p /U01/DB_BACKUP/oracleworlds/
mkdir -p /U02/DB_BACKUP/oracleworlds/ (oracleworlds is a DB Name)
2-Connect RMAN .
rman target /
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘Location of controlfile snapshot’;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK CONNECT ‘*’ FORMAT ‘Backup_location/DB_NAME/%U’;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK CONNECT ‘*’ FORMAT ‘Backup_location/DB_NAME/%U’;
EXAMPLE:
rman target /
RMAN>CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 2;
(if you want to configure backup on only one location make parallelism 1)
RMAN>CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘+DATADG/oracleworlds/snap_oracleworldsf’;
RMAN>CONFIGURE CHANNEL 1 DEVICE TYPE DISK CONNECT ‘*’ FORMAT ‘/U01/DB_BACKUP/oracleworlds/%U’;
RMAN>CONFIGURE CHANNEL 2 DEVICE TYPE DISK CONNECT ‘*’ FORMAT ‘/U02/DB_BACKUP/oracleworlds/%U’;
Now your database backup location succusfully changed to ‘/U02/DB_BACKUP/oracleworlds/%U’
last but not least
Test whether your configuration correct :
rman target sys@cluser_db
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORACLEWORLDS are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK CONNECT ‘*’ FORMAT ‘/U01/DB_BACKUP/oracleworlds/%U’;
CONFIGURE CHANNEL 2 DEVICE TYPE DISK CONNECT ‘*’ FORMAT ‘/U02/DB_BACKUP/oracleworlds/%U’;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default
CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK APPLIED ON ALL STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘+DATADG/oracleworlds/snap_oracleworldsf’;
Now test and make sure backup is going on configured location-
RMAN>
run
{
BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL NOT BACKED UP FILESPERSET 10 DELETE ALL INPUT TAG ‘ARCH’;
}
Go to configured location and verify that backup files are available.