5 Replies Latest reply on Dec 7, 2012 1:15 AM by onedbguru

    GZIP RMAN BACKUP

    mustuq81
      Dear All
      We are running Oracle 10g(10.2.0.4) on Solaris 10
      I want to gzip up my rman backups, which are to disk.
      How do I add the command to my script so after end of backup it starts gzipping it.
      Please find the script below

      export ORACLE_BASE=/app/oradataerp/oraprod
      export ORACLE_HOME=/app/oradataerp/oraprod/db/tech_st/10.2.0
      export ORACLE_SID=PROD
      export LD_LIBRARY_PATH=${ORACLE_HOME}/lib
      export PATH=${ORACLE_HOME}/bin:${ORACLE_HOME}/lib:${PATH}
      export DATE=`/usr/bin/date +%Y%m%d`
      rman target sys/***** nocatalog msglog /nfs-bkp-erp/PROD-ERP/PROD-DB/RMAN.${DATE}.log <<EOF
      crosscheck archivelog all;
      #backup database format '/nfs-bkp-erp/PROD-ERP/PROD-DB/PROD_t%t_s%s_p%p%c';
      #backup current controlfile format '/nfs-bkp-erp/PROD-ERP/PROD-DB/PROD_cntrl_t%t_s%s_p%p%c';
      #delete noprompt archivelog All complEted before 'SYSDATE-10';
      crosscheck backup;
      #delete expired archivelog all;
      delete obsolete;
      crosscheck backup;
      EXIT
      EOF;


      Regards
      Musaddaq
        • 1. Re: GZIP RMAN BACKUP
          Santosh Pradhan
          make another script
          see how long it takes for ur RMAN backup.
          And then schedule ur script through crontab accordingly
          1 person found this helpful
          • 2. Re: GZIP RMAN BACKUP
            Niket Kumar
            you can use compress backupset command in which compression is done by rman.

            http://www.dba-oracle.com/t_backup_compression.htm
            1 person found this helpful
            • 3. Re: GZIP RMAN BACKUP
              saratpvv
              Script:

              You can add this line to your scripit..

              ls -ltr filename*|awk '{print $9}'|xargs gzip----->to GZIP the new backup files
              1 person found this helpful
              • 4. Re: GZIP RMAN BACKUP
                Paul M.
                ls -ltr filename*|awk '{print $9}'|xargs gzip----->to GZIP the new backup files
                Why complicate easy things ? As already stated, the compression can be "on the fly".

                http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#i1015382
                1 person found this helpful
                • 5. Re: GZIP RMAN BACKUP
                  onedbguru
                  When using compression, you will need to actually test to see which backup compression gives you the best compression/performance. Higher compression = slower performance, Lower compression ratio = more performance.

                  To make your life a lot easier when trying to do backups, make sure you do rman backup to disk, then sweep these backups to tape. The restore would then be much faster.
                  1 person found this helpful