1 2 Previous Next 17 Replies Latest reply: Oct 3, 2013 3:30 AM by 984556 Go to original post RSS
      • 15. Re: Oracle Database Archive Logs
        984556

        Just a quick question tnoble.

         

        I have made one full backup plus archivelog

         

        then made the following settings in the rman catalog :

         

         

         

        RMAN> show all;

         

         

        RMAN configuration parameters are:

        CONFIGURE RETENTION POLICY TO REDUNDANCY 1;

        CONFIGURE BACKUP OPTIMIZATION ON;

        CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

        CONFIGURE CONTROLFILE AUTOBACKUP ON;

        CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rmanbk/controlfiles/%F';

        CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # 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   '/rmanbk/backup/datafile_%d_%s_%t';

        CONFIGURE MAXSETSIZE TO UNLIMITED; # default

        CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/proddb/9.2.0/dbs/snapcf_PROD.f'; # default

         

         

        RMAN> delete obsolete;

         

         

        RMAN retention policy will be applied to the command

        RMAN retention policy is set to redundancy 1

        using channel ORA_DISK_1

        no obsolete backups found

         

         

         

         

        Basically I want to keep archivelogs only for the last 3 days and delete, but is there something i'm missing from the above policy or command ?

         

        thanks

        • 16. Re: Oracle Database Archive Logs
          EdStevens

          984556 wrote:

           

          Just a quick question tnoble.

           

          I have made one full backup plus archivelog

           

          then made the following settings in the rman catalog :

           

           

           

          RMAN> show all;

           

           

          RMAN configuration parameters are:

          CONFIGURE RETENTION POLICY TO REDUNDANCY 1;

          CONFIGURE BACKUP OPTIMIZATION ON;

          CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

          CONFIGURE CONTROLFILE AUTOBACKUP ON;

          CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rmanbk/controlfiles/%F';

          CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # 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   '/rmanbk/backup/datafile_%d_%s_%t';

          CONFIGURE MAXSETSIZE TO UNLIMITED; # default

          CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/proddb/9.2.0/dbs/snapcf_PROD.f'; # default

           

           

          RMAN> delete obsolete;

           

           

          RMAN retention policy will be applied to the command

          RMAN retention policy is set to redundancy 1

          using channel ORA_DISK_1

          no obsolete backups found

           

           

           

           

          Basically I want to keep archivelogs only for the last 3 days and delete, but is there something i'm missing from the above policy or command ?

           

          thanks

          No, you don't want to "keep archivelogs only for last 3 days".  You want to keep archivelogs to enforce/protect your retention policy.  You said you took one backup and set your retention policy to 'redundancy 1'.  That one backup is your 'one redundancy'.   If you don't take another backup for a week, month, year, whatever, until you take another backup, neither that one backup nor any archivelogs subsequent to it will be considered obsolete.

          • 17. Re: Oracle Database Archive Logs
            984556

            EdStevens wrote:

             

             

            No, you don't want to "keep archivelogs only for last 3 days".  You want to keep archivelogs to enforce/protect your retention policy.  You said you took one backup and set your retention policy to 'redundancy 1'.  That one backup is your 'one redundancy'.   If you don't take another backup for a week, month, year, whatever, until you take another backup, neither that one backup nor any archivelogs subsequent to it will be considered obsolete.

             

            thanks, after making it to redundancy = 1 ; it will only keep the last backup and delete obsolete would delete the old backups,

             

            so basically it works like this in my case (please correct me if I am wrong ) all the archivelogs will be there for the coming days until I take another Full backup and then once I will run the command

            > delete obsolete

            it will delete the archivelogs and datafiles and controlfile which was taken prior to the latest backup.

             

            RMAN> show all;

             

             

            RMAN configuration parameters are:

            CONFIGURE RETENTION POLICY TO REDUNDANCY 1;

            CONFIGURE BACKUP OPTIMIZATION ON;

            CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

            CONFIGURE CONTROLFILE AUTOBACKUP ON;

            CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rmanbk/controlfiles/%F';

            CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # 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   '/rmanbk/backup/datafile_%d_%s_%t';

            CONFIGURE MAXSETSIZE TO UNLIMITED; # default

            CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/proddb/9.2.0/dbs/snapcf_PROD.f'; # default

             

            RMAN> report need backup;

             

             

            RMAN retention policy will be applied to the command

            RMAN retention policy is set to redundancy 1

            Report of files with less than 1 redundant backups

            File #bkps Name

            ---- ----- -----------------------------------------------------

             

            RMAN> report obsolete;

             

             

            RMAN retention policy will be applied to the command

            RMAN retention policy is set to redundancy 1

            Report of obsolete backups and copies

            Type                 Key    Completion Time    Filename/Handle

            -------------------- ------ ------------------ --------------------

            Backup Set           2696   14-SEP-13

              Backup Piece       2703   14-SEP-13          /rmanbk/backup/datafile_PROD_2_826141471

            Backup Set           2697   14-SEP-13

              Backup Piece       2704   14-SEP-13          /rmanbk/backup/datafile_PROD_3_826141909

            ......

            ......

            .....

             

             

            RMAN> delete obsolete;

             

             

            RMAN retention policy will be applied to the command

            RMAN retention policy is set to redundancy 1

            using channel ORA_DISK_1

            Deleting the following obsolete backups and copies:

            Type                 Key    Completion Time    Filename/Handle

            -------------------- ------ ------------------ --------------------

            Backup Set           2696   14-SEP-13

              Backup Piece       2703   14-SEP-13          /rmanbk/backup/datafile_PROD_2_826141471

            Backup Set           2697   14-SEP-13

              Backup Piece       2704   14-SEP-13          /rmanbk/backup/datafile_PROD_3_826141909

            Backup Set           2698   14-SEP-13

              Backup Piece       2705   14-SEP-13          /rmanbk/backup/datafile_PROD_4_826142327

            ....

             

            ..

            .....

            .....

            Do you really want to delete the above objects (enter YES or NO)? yes

             

            RMAN> crosscheck backupset of database;

             

             

             

            or

            RMAN> crosscheck backup;

             

             

            using channel ORA_DISK_1

            crosschecked backup piece: found to be 'EXPIRED'

            backup piece handle=/rmanbk/backup/datafile_PROD_2_826141471 recid=2 stamp=826141477

            crosschecked backup piece: found to be 'EXPIRED'

            backup piece handle=/rmanbk/backup/datafile_PROD_3_826141909 recid=3 stamp=826141914

            crosschecked backup piece: found to be 'EXPIRED'

            .....

            .....

            .....

            .....

            backup piece handle=/rmanbk/backup/datafile_PROD_18_827627728 recid=17 stamp=827627744

            crosschecked backup piece: found to be 'AVAILABLE'

            backup piece handle=/rmanbk/backup/datafile_PROD_21_827883362 recid=19 stamp=827883370

            crosschecked backup piece: found to be 'AVAILABLE'

            backup piece handle=/rmanbk/backup/datafile_PROD_22_827883770 recid=20 stamp=827883775

            crosschecked backup piece: found to be 'AVAILABLE'

            backup piece handle=/rmanbk/backup/datafile_PROD_23_827884157 recid=21 stamp=827884163

             

            1 2 Previous Next