Why is backup going in wrong directory after setting up ARCHVIE_LOG_DEST_1 & RECOVERY_FILE_DEST
SYS@orcl SQL>select name, value from v$parameter where name like 'log_archive_dest_%';

NAME                 VALUE
-------------------- -----------------------------------------------------------------------
log_archive_dest_1   LOCATION="/oracle/archive/orcl/arch" valid_for=(ALL_LOGFILES,ALL_ROLES)
SYS@orcl SQL> sho parameter db_recovery

NAME                          TYPE         VALUE
----------------------------- ------------ ----------------------------------
db_recovery_file_dest         string       /dbexports/backup/orcl/rmanbkp
db_recovery_file_dest_size    big integer  7G
But still, backup was going to "/dbexports/backup/orcl"
Piece Name: /dbexports/backup/orcl/nnp87tbc_1_1
Connect to RMAN and execute show all and see "configure channel device type disk format" and see where the backup destination is configured. This resolves the issue :
RMAN> show all;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO 'DISK';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/dbexports/backup/orcl/controlfile_%d_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/dbexports/backup/orcl/%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 NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/11.2.0/db_3/dbs/snapcf_orcl.f'; # default

Look the hightlighted line "CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT from the above output. That is the culprit that gave the trouble. It sets the destination where the backup pieces are going so far "/dbexports/backup/orcl/%U

So, let's fix this by setting the right backup destination using rman configure channel device type disk format ... command.

RMAN> configure channel device type disk format '/dbexports/backup/orcl/rmanbkp/%U';	  
old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/dbexports/backup/orcl/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/dbexports/backup/orcl/rmanbkp/%U';
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
starting full resync of recovery catalog
full resync complete
Comments