1

I see a different output or behaviour of RMAN 'backup database' command using "format keyword" when I keep the part of the syntax once in the middle and the other in the end it stores backup at different location as mentioned in the below cases

In the below case 1 - I used the format keyword in the middle and it saves the backupsets in the defined location, however if I use the same command with format keyword in the end it stores the backup pieces in ORACLE_HOME/dbs location. Not sure, why it does that. Any ideas would be really appreciable.

Note : - FRA parameters are not enabled as earlier it was storing the backup pieces to FRA location while using case2.

Case 1 : - Using the format keyword in the middle.

RMAN> backup format '/o/export/export/cold_test/backup_%U_%u_%t_%d' incremental level 0 database plus archivelog ;


Starting backup at 04-FEB-19
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=283 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=16 RECID=16 STAMP=999351604
input archived log thread=1 sequence=17 RECID=17 STAMP=999351609
input archived log thread=1 sequence=18 RECID=18 STAMP=999351923
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1stp1pjj_1_1_1stp1pjj_999351923_TEST tag=TAG20190204T134523 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19

Starting backup at 04-FEB-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA_01/TEST/DATAFILE/tnext_indx.dbf
input datafile file number=00005 name=+DATA_01/TEST/DATAFILE/tnext_data.dbf
input datafile file number=00007 name=+DATA_01/TEST/DATAFILE/tnext_data02.dbf
input datafile file number=00008 name=+DATA_01/TEST/DATAFILE/tnext_data03.dbf
input datafile file number=00003 name=+DATA_01/TEST/DATAFILE/sysaux.dbf
input datafile file number=00001 name=+DATA_01/TEST/DATAFILE/system.dbf
input datafile file number=00004 name=+DATA_01/TEST/DATAFILE/undotbs1.dbf
input datafile file number=00006 name=+DATA_01/TEST/DATAFILE/users.dbf
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1ttp1pjk_1_1_1ttp1pjk_999351924_TEST tag=TAG20190204T134524 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1utp1pjr_1_1_1utp1pjr_999351931_TEST tag=TAG20190204T134524 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19

Starting backup at 04-FEB-19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=19 RECID=19 STAMP=999351933
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_1vtp1pjt_1_1_1vtp1pjt_999351933_TEST tag=TAG20190204T134533 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19

RMAN>

Case 2: Using the format keyword in the end of the backup command.

RMAN> backup incremental level 0 database plus archivelog format '/o/export/export/cold_test/backup_%U_%u_%t_%d' ;


Starting backup at 04-FEB-19
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=283 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=16 RECID=16 STAMP=999351604
input archived log thread=1 sequence=17 RECID=17 STAMP=999351609
input archived log thread=1 sequence=18 RECID=18 STAMP=999351923
input archived log thread=1 sequence=19 RECID=19 STAMP=999351933
input archived log thread=1 sequence=20 RECID=20 STAMP=999352079
input archived log thread=1 sequence=21 RECID=21 STAMP=999352087
input archived log thread=1 sequence=22 RECID=22 STAMP=999358913
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_29tp20e1_1_1_29tp20e1_999358913_TEST tag=TAG20190204T154153 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19

Starting backup at 04-FEB-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA_01/TEST/DATAFILE/tnext_indx.dbf
input datafile file number=00005 name=+DATA_01/TEST/DATAFILE/tnext_data.dbf
input datafile file number=00007 name=+DATA_01/TEST/DATAFILE/tnext_data02.dbf
input datafile file number=00008 name=+DATA_01/TEST/DATAFILE/tnext_data03.dbf
input datafile file number=00003 name=+DATA_01/TEST/DATAFILE/sysaux.dbf
input datafile file number=00001 name=+DATA_01/TEST/DATAFILE/system.dbf
input datafile file number=00004 name=+DATA_01/TEST/DATAFILE/undotbs1.dbf
input datafile file number=00006 name=+DATA_01/TEST/DATAFILE/users.dbf
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/oracle/DB12102/dbs/2atp20e2_1_1 tag=TAG20190204T154154 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/oracle/DB12102/dbs/2btp20e6_1_1 tag=TAG20190204T154154 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19

Starting backup at 04-FEB-19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=23 RECID=23 STAMP=999358920
channel ORA_DISK_1: starting piece 1 at 04-FEB-19
channel ORA_DISK_1: finished piece 1 at 04-FEB-19
piece handle=/o/export/export/cold_test/backup_2ctp20e8_1_1_2ctp20e8_999358920_TEST tag=TAG20190204T154200 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-FEB-19

RMAN>

Thanks, DBA

Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55

1 Answers1

0

The backup command contains two keys file formats. The first key format defines the location and format of the backup file for the database itself, the second key format defines the location and format of the backup file for archive logs.

RMAN> backup format '/o/export/export/cold_test/backup_%U_%u_%t_%d'  incremental level 0 database plus archivelog format '/o/export/export/cold_test/backup_%U_%u_%t_%d' ;
Dmitry Demin
  • 2,006
  • 2
  • 15
  • 18