9 Replies Latest reply: Jul 9, 2010 10:23 AM by NS RSS

    rman disk channel question?

    523059
      Hi I trying to configure rman backups using a NFS mounted filesystem so that I can give another system access to the backup sets so that I can make clones of the database using RMAN duplicate.
      I have an rman script that I created that sets up the channels as I have done in the past but the only differnce is that is the past my disk channels were actually configured to write to an ASM diskgroup name as opposed to how I am doing it now which is configuring the channel to just point to the nfs mounted file system as in this example...
      run {
      allocate channel ch1 device type disk format '/rmanbackups/backupsets/';
      allocate channel ch2 device type disk format '/rmanbackups/backupsets/';
      allocate channel ch3 device type disk format '/rmanbackups/backupsets/';
      sql 'alter system archive log current';
      backup incremental level 0 filesperset 10 database;
      backup archivelog all;
      backup current controlfile; }

      The problem I am seeing and the big difference from when I used to use ASM is that when I use the above script the rman session is creating everything as a file name backupsets where in the past when using ASM it would automatically create a backupsets directory and also a directory with the date of when the backupset was created. I thought this would also happen automatically with the NFS mount point setup as the disk chanel but this is not that case and it is literally trying to create the backupset with whatever name I put in the channel configuration script....
      Any thoughts on this would be greatly welcomed.
      Thanks in advance.
        • 1. Re: rman disk channel question?
          damorgan
          What operating system?
          What version of Oracle?

          All NFS mount points are not equal.

          Is this a permanent mount (/etc/fstab) or a temporary mount? You want fixed.
          • 2. Re: rman disk channel question?
            523059
            I mounted it in the fstab with the following options as suggested by oracle...

            nas01-storage:/nfs/rmanbackups /rmanbackups nfs rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768,tcp
            • 3. Re: rman disk channel question?
              NS
              ASM has inbuilt capabilities to generate names,directories and tags as needed.

              Edited by: Nayab on Jul 8, 2010 9:03 AM
              • 4. Re: rman disk channel question?
                523059
                So then do you know how I would do this using an NFS mounted file system?
                • 5. Re: rman disk channel question?
                  NS
                  You can not achieve same thing with NFS.

                  You can do this.

                  CONFIGURE DEFAULT DEVICE TYPE TO DISK;
                  CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rmanbackups/backupsets/${SID}_df%t_s%s_s%p';

                  %t = timstamp
                  %s = backup set number
                  %p = backup piece number

                  Now modify your backup script like this
                  run {
                  allocate channel ch1 device type disk;

                  Hope this helps.

                  Thanks,
                  Nayab

                  Edited by: Nayab on Jul 8, 2010 12:34 PM
                  • 6. Re: rman disk channel question?
                    523059
                    Hi, I tried you suggestion but when I ran my script it still created the backup set inside the ASM diskgroup? I cant understand why it would go to the ASM diskgroup becuase I set my default device type for disk to point to the NFS mount as you suggested and then changed my script to just setup one channel to device tyoe disk?
                    Here are my rman parameters...
                    RMAN> show all;

                    using target database control file instead of recovery catalog
                    RMAN configuration parameters are:
                    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
                    CONFIGURE BACKUP OPTIMIZATION OFF; # default
                    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
                    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
                    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
                    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 '/rmanbackups/backupsets/${SID}_df%t_s%s_s%p';
                    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
                    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
                    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
                    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
                    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orahomes/10gr2_db_home/dbs/snapcf_qmstr.f'; # default

                    And here is my script I am calling from a shell script.
                    run {
                    allocate channel ch1 device type disk;
                    sql 'alter system archive log current';
                    backup incremental level 0 filesperset 10 database;
                    backup archivelog all;
                    backup current controlfile; }

                    Is there a syntax error in this line?
                    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rmanbackups/backupsets/${SID}_df%t_s%s_s%p';

                    Not sure why it would still write to ASM?
                    • 7. Re: rman disk channel question?
                      NS
                      $SID was just as an example, You could put the name of your database.
                      But anyways, modify it like this and run the backup.
                      CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rmanbackups/backupsets/oracle_df%t_s%s_s%p';
                      • 8. Re: rman disk channel question?
                        523059
                        I used your exact syntax and still it writes to my ASM diskgroup? Any thoughts?
                        Thx.
                        • 9. Re: rman disk channel question?
                          NS
                          Remove the allocate channel part from your backup script.
                          run {
                          sql 'alter system archive log current';
                          backup incremental level 0 filesperset 10 database;
                          backup archivelog all;
                          backup current controlfile; }
                          If you manually allocate a channel during a job, then RMAN disregards any configured channel settings.