6 Replies Latest reply on Jul 25, 2012 3:35 AM by user10697869

    RMAN ASM ARCHIVE LOG BACKUP SCRIPT

    789987
      im looking for a logic for RAC Instance rman archive log backup script....

      currently our stand alone server will run the archive log backup script when the archive mount point destination is 50%. I have used os commands to get the value from df-h(on linux).

      So i need to develop a script where i need to get the used space of the diskgroup which is in ASM and then i need to invoke the archive backup script when it is more thatn 50% of the diskgroup space.
        • 1. Re: RMAN ASM ARCHIVE LOG BACKUP SCRIPT
          damorgan
          If I understand what you are trying to do in some unknown version of Oracle, and I am only guessing here, what you are trying to do will at best work poorly ... perhaps not at all.

          So let's start with some questions so we can better help you.

          1. What product ... edition and version.
          2. Backing up with RMAN to what and where? Where, for example, is the FRA located? Is it also on ASM and visible to both instances?

          It seems you are trying to do this with a cron job and, if so, I would recommend against that approach. With RAC it is far better to run backups using DBMS_SCHEDULER.
          • 2. Re: RMAN ASM ARCHIVE LOG BACKUP SCRIPT
            789987
            Oracle 11gR2 is my current version of the database.
            Backing up with RMAN to disk.

            I scheduled crontab job script to take backup every 30min if it reaches it's threshold on archive destionation mountpoint.
            • 3. Re: RMAN ASM ARCHIVE LOG BACKUP SCRIPT
              mnsinger
              You can get that info from v$asm_disk.
              • 4. Re: RMAN ASM ARCHIVE LOG BACKUP SCRIPT
                damorgan
                Cron is the worst possible tool for doing this and you still didn't answer the original question ... backing up to where? "Disk" is not the answer ... are you backing up to the FRA? To a ZFS appliance? To a DataDomain? To ASM or a file system?

                But back to cron.

                Are you going to run that cron job on one node or all?
                If on one what are you going to do when that node is down?
                If on all what are you going to do when you get twice as many backups or backups running on both simultaneously doubling the load?

                The days of cron jobs having much value ended more than a decade ago.

                Run your backup from inside the database using DBMS_SCHEDULER ... it will choose the right node 100% of the time because it knows not only which nodes are up ... it knows the loading on the nodes.
                • 5. Re: RMAN ASM ARCHIVE LOG BACKUP SCRIPT
                  JoergJost
                  Hi,

                  withou hijacking this thread, do you mean to set up a dbms_scheduler job to call an external script which runs the backup?

                  I use this technique to establish a standby database, because of missing Licences for Dataguard (only SE here).

                  But for backup we use still cron jobs, even on RAC.

                  Thx and sorry for hijacking.

                  Joerg
                  • 6. Re: RMAN ASM ARCHIVE LOG BACKUP SCRIPT
                    user10697869
                    DaMorgan,
                    If we use VIPs, then backup will run even though instance is down. If node is down for maintenance -- execute cron from another node.

                    Can u give an example of ur code using DBMS_scheduler.

                    Thanks