Re: delete obsolete for archivelogs

  • From: Jay Hostetter <hostetter.jay@xxxxxxxxx>
  • To: Ravi Madabhushanam <ravi.madabhushanam@xxxxxxxxx>
  • Date: Thu, 1 Jul 2010 08:38:50 -0400

Ravi - yes, I am getting messages that say "already backed up 2 time(s)".

Niall - here is the summary:

RMAN> list backup of database summary;

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
3636    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3637    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3638    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3639    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3640    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3641    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3642    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3643    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3644    B  F  A DISK        29-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3649    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3650    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3651    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3652    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3653    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3654    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3655    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3656    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP
3657    B  F  A DISK        30-JUN-10       1       1       YES
DAILY_FULL_BACKUP

And here is a sample archivelog that appears in two backup sets:

RMAN> list backup of archivelog logseq 23942;

List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ----------------
3647    712.53M    DISK        00:05:58     06-29-2010 20:59
        BP Key: 3647   Status: AVAILABLE  Compressed: YES  Tag:
DAILY_ARCH_BACKUP
        Piece Name: H:\ORACLE_BACKUPS\SALES2\ARC_S3661_P1_T722983993.BCK
  List of Archived Logs in backup set 3647
  Thrd Seq     Low SCN    Low Time         Next SCN   Next Time
  ---- ------- ---------- ---------------- ---------- ---------
  1    23942   33086482704 06-29-2010 20:46 33086482939 06-29-2010 20:46
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ----------------
3660    722.99M    DISK        00:05:29     06-30-2010 20:54
        BP Key: 3660   Status: AVAILABLE  Compressed: YES  Tag:
DAILY_ARCH_BACKUP
        Piece Name: H:\ORACLE_BACKUPS\SALES2\ARC_S3674_P1_T723070169.BCK
  List of Archived Logs in backup set 3660
  Thrd Seq     Low SCN    Low Time         Next SCN   Next Time
  ---- ------- ---------- ---------------- ---------- ---------
  1    23942   33086482704 06-29-2010 20:46 33086482939 06-29-2010 20:46


This morning I checked to see if anything is obsolete (all obsolete items
should have been purged by last nights backup - in fact the obsolete backups
were purged.  Archivelogs were not).

RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
no obsolete backups found

Later today I'll be forcing a purge of archivelogs with "delete archivelog
all backed up 2 times to disk".
Thank you,
Jay


On Thu, Jul 1, 2010 at 1:51 AM, Ravi Madabhushanam <
ravi.madabhushanam@xxxxxxxxx> wrote:

> Jay,
>
> By default the backup command will not backup an archive log for the second
> time. Retention policy will tell what to retain and how long to retain. But
> not what not to backup. It has been my belief  for long time and I'm yet to
> find a reason to contradict myself.
>
> Are you observing messages like "already backed up *1* time(s)".
> Personally I faced this issue, where the backup happens only once and I'll
> delete only after taking 2 backups. Result is infinite archive log retention
> or disk full -> backup fail :(
>
> You may want to use below command for archive log backups:
> backup archivelog all not backed up 2 times to disk;
>
> HTH.
>
>

Other related posts: