8 Replies Latest reply: Jun 23, 2013 7:12 AM by 966684 RSS

    RMAN

    966684

      Hi All,

       

      Using Oracle 11.2.0.2 on RHEL5.6.  Single Instance DB with a Physical standby configured. I Take a full backup daily.

      Not using FRA. LOG_ARCHIVE_DEST is a non-default location. Post backup I copy the backup to a backup server and clear the space

       

      Want your advise on how to do the following;

      a. create a proper archive deletion policy and retention policy

      b. Keep the archive logs for 2 days

      c. delete the obsolete backups post backup, automatically through RMAN commands

       

      Also, can I define separate retention policies for database backup and archive log backups.

        • 1. Re: RMAN
          ChrisGooch

          a) You decide this when configuring RMAN and the backup scripts

          b) delete archivelog until time 'sysdate-1' backed up 1 times to disk; --> This will delete any archivelogs older than 2 days and have been backed up.

          c) delete noprompt force obsolete; --> This will remove any obsolete backups that are outside your recovery window.

           

          And for your last question....No they both go hand in hand.

          • 2. Re: RMAN
            TSharma-Oracle

            These are very basic RMAN questions. You should better read the doc to have full understanding.

            http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmconfb.htm

            • 3. Re: RMAN
              966684

              Hi Chris,

              I want to keep archive logs for 2 days but delete the previous data backup.

              • 4. Re: RMAN
                ChrisGooch

                Don't think that is possible via recovery window.

                 

                Your backup script would have to look something like this:

                 

                run{

                backup database ......;

                delete backup completed before 'sysdate-1';

                delete archivelog until time 'sysdate-2' backed up 1 times to disk;

                }

                • 5. Re: RMAN
                  966684

                  Chris, Can I use noprompt with this delete option;

                   

                  -- delete noprompt backup completed before 'sysdate-1';

                  -- delete noprompt archivelog until time 'sysdate-2' backed up 1 times to disk;

                  • 6. Re: RMAN
                    ChrisGooch

                    Yes both work with noprompt clause.

                    • 7. Re: RMAN
                      966684

                      Hi Chris,

                      I have configured as below but getting error;

                      rman> configure archivelog deletion policy to redundancy 1;

                      rman>delete archivelog until time 'sysdate-2' backed up 1 times to disk;

                      rman> delete backup completed before 'sysdate-1';

                       

                      Error;

                      RMAN-08138: WARNING: archived log not deleted - must create more backups

                      • 8. Re: RMAN
                        966684

                        Hi Chris,

                        Getting the following warning; Can I ignore the warning.

                        rman > show retention policy;

                        rman> CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

                        rman > show archivelog deletion policy;

                        CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

                        delete archivelog until time 'sysdate-2' backed up 1 times to disk;


                        RMAN-08138: WARNING: archived log not deleted - must create more backups