5 Replies Latest reply: Feb 17, 2013 7:54 PM by Hemant K Chitale RSS

    RMAN backup goes to filesystem and not to ASM diskgroup

    kumarsk
      Hi,

      DB: 11.2.0.1
      OS: Linux

      Parameter configured in database:

      SQL> show parameter db_recovery_file_dest

      NAME TYPE VALUE
      ------------------------------------ ----------- ------------------------------
      db_recovery_file_dest string +BACKUP
      db_recovery_file_dest_size big integer 10184M


      If i execute the command " RMAN> backup database; " , then the backup ( backup pieces) is going to +BACKUP destination and this is as expected.

      But, if i execute the same command using script, then the backup pieces are going to filesystem(default location $ORACLE_HOME/dbs ).

      Could you suggest me(if i understood wrongly), why the backup pieces are going to the location of filesystem , and not to the ASM diskgroup ?.

      I want to take the backup to ASM diskgroup, because of less space at filesystem.

      The script i used is this:

      [oracle@rac1 rmanscripts]$ more online.sh
      export ORACLE_SID=test;
      export NLS_DATE_FORMAT='dd/mm/yy hh24:mi:ss';
      umask 022
      date
      rman target / cmdfile online.rcv msglog online.log

      [oracle@rac1 rmanscripts]$ more online.rcv
      run {
      backup
      full
      tag b_db_full_test
      filesperset 2
      format 'df_%d_%t_%s_%p'
      database include current controlfile;
      }


      Thanks in advance,

      Regards,
        • 1. Re: RMAN backup goes to filesystem and not to ASM diskgroup
          mseberg
          Hello;


          I'm thinking you haven't defined the location for database backups and RMAN automatically backs up the files under $ORACLE_HOME/dbs folder.

          Example

          CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+BACKUP';

          Best Regards

          mseberg
          • 2. Re: RMAN backup goes to filesystem and not to ASM diskgroup
            kumarsk
            Hi mseberg,

            Thanks for your reply and the thing is that the controlfile autobackup is going to ASM diskgroup ( +BACKUP).
            Even after changing the suggested config, no luck to me.

            RMAN> show all;

            RMAN configuration parameters for database with db_unique_name TEST are:
            CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS;
            CONFIGURE BACKUP OPTIMIZATION ON;
            CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
            CONFIGURE CONTROLFILE AUTOBACKUP ON;
            CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+BACKUP';
            CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
            CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
            CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
            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 APPLIED ON ALL STANDBY;
            CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/snapcf_test.f'; # default

            Backup piece destination info from log is here:

            channel ORA_DISK_2: finished piece 1 at 16/02/13 22:41:22
            piece handle=/home/oracle/app/oracle/product/11.2.0/dbhome_2/dbs/df_TEST_807575973_155_1 tag=B_DB_FULL_TEST comment=NONE
            channel ORA_DISK_2: backup set complete, elapsed time: 00:01:49
            Finished backup at 16/02/13 22:41:22

            Starting Control File and SPFILE Autobackup at 16/02/13 22:41:22
            piece handle=+BACKUP/test/autobackup/2013_02_16/s_807576082.342.807576083 comment=NONE
            Finished Control File and SPFILE Autobackup at 16/02/13 22:41:25


            I cannot understand why this is,

            Regards,
            • 3. Re: RMAN backup goes to filesystem and not to ASM diskgroup
              mseberg
              Hello;

              Does this work?

              backup as compressed backupset database format '+BACKUP';

              If yes, I would change the format in my script.

              Best Regards

              mseberg
              • 4. Re: RMAN backup goes to filesystem and not to ASM diskgroup
                kumarsk
                Hi mseberg,

                I have tested this option and this works well. Seems i need to update my script and this behavior is bit strange to me.

                Thank you very much for your updates.

                Regards,
                • 5. Re: RMAN backup goes to filesystem and not to ASM diskgroup
                  Hemant K Chitale
                  The FORMAT specified in the BACKUP DATABASE command overrides the db_recovery_file_dest parameter.

                  Even if you run a BACKUP DATABASE FORMAT '+BACKUP', it doesn't register the backups as known FRA contents -- ie. you may not find the backup pieces in V$RECOVERY_AREA_USAGE


                  Hemant K Chitale