This discussion is archived
10 Replies Latest reply: Jan 10, 2012 8:46 PM by 19041 RSS

Delete old backup from Tivoli tape media

Sunand Newbie
Currently Being Moderated
Hi,

DB: 10.2.0.4 RAC ASM
OS: AIX 5.3 L 64-bit

I have FRA disk and tape daily backups for my live database. I have 3 as retention policy.I do not have any catalog database.

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/oracle/product/10.2.0.1/db_1
/dbs/snapcf_gcprod1.f'; # default

As per the retention policy , the database backup on FRA is there for last 3 days.This everything is fine.

If i look my tape backup contents , it has 6 months old backup also.
I want to delete all old backups from tape and need only last 1 month backup .How do i can do this?.

If i allocate tape channel and run delete obsolete , will it delete all backup pieces from tape except last 3 days , as per retention policy?.If yes, then it will be problem for us.

I did not specify any delete obsolete query in my tape backup script , given crosscheck only.

Am i ok with below steps ,

run
{
allocate channel c1 type 'sbt_tape' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck backup;
delete noprompt obsolete ;
crosscheck archivelog all;
delete noprompt expired archivelog all;
}

Please suggest me how can i delete old backup files from tape.Tivoli guys are saying that tape backup contents have to be deleted from RMAN only.Shall i have to provide any additional details?.

Thanks,
Sunand
  • 1. Re: Delete old backup from Tivoli tape media
    Chinar Guru
    Currently Being Moderated
    Am i ok with below steps ,
    run
    {
    allocate channel c1 type 'sbt_tape' parms
    'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    crosscheck backup;
    delete noprompt obsolete ;
    crosscheck archivelog all;
    delete noprompt expired archivelog all;
    }
    It seems this script ok and will delete all obsolete(old) backups fro tape.
  • 2. Re: Delete old backup from Tivoli tape media
    Sunand Newbie
    Currently Being Moderated
    Hi Chinar,

    Thank you very much for your quick reply.

    Will it delete all backups beyond 3 days retention policy in tape?.

    Shall i have to do any manual delete in tape after running the requested script?.

    What do you think about delete obsolete recovery window of 15 days  device type 'sbt_tape' command ?


    Really appreciate your help.

    Thanks & Regards,
    Sunand
  • 3. Re: Delete old backup from Tivoli tape media
    704135 Expert
    Currently Being Moderated
    Rman mark the backups to remove, but it is tivoly who drop it.

    Look at the options of TDPO and you can use tdposync.

    RTFM of tivoly. You know, in IBM web.
  • 4. Re: Delete old backup from Tivoli tape media
    Chinar Guru
    Currently Being Moderated
    sunand wrote:
    Hi Chinar,

    Thank you very much for your quick reply.

    Will it delete all backups beyond 3 days retention policy in tape?.
    Yes
    Shall i have to do any manual delete in tape after running the requested script?.
    No
    What do you think about delete obsolete recovery window of 15 days  device type 'sbt_tape' command ?
    You can use it also
  • 5. Re: Delete old backup from Tivoli tape media
    481487 Newbie
    Currently Being Moderated
    Hi,
    1st method:
    First you should change retention policy to 31 days for this database.
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS;

    Next, you can run delete obsolete - RMAN show you all backups older than 31 days.
    RMAN> delete noprompt obsolete;

    2nd method:
    You should change all backupset (which will be excluded from delete obsolete) keep time to 31 days (f.e. sysdate-31) and next run delete obsolete.

    Regards,
    Beata
  • 6. Re: Delete old backup from Tivoli tape media
    Sunand Newbie
    Currently Being Moderated
    Hi All,

    I have 2010 April backup files in tape.

    When i given
    run {
    allocate channel c1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    delete obsolete recovery window of 10 days device type 'sbt_tape'; #tried replacing delete obsolete , but no use
    }
    I am getting as below,

    allocated channel: c1
    channel c1: sid=78 devtype=SBT_TAPE
    channel c1: Data Protection for Oracle: version 5.4.1.0
    no obsolete backups found
    released channel: c1

    If i give delete obsolete which comes inside retention period , then it is displaying.I mean , i can see last 3 days data in tape to delete , as per retention policy. It is not showing beyond retention period data.

    Other than this, daily i have ASM disk backup which will take the backup to FRA disk and delete the obsolete value from disk.But, this is not the case with Tape backup. Tape backup script had crosscheck backupset and archivelog along with backup database commands .

    Any help really appreciate.

    Thanks,
    Sunand
  • 7. Re: Delete old backup from Tivoli tape media
    Chinar Guru
    Currently Being Moderated
    I have 2010 April backup files in tape.
    I think problem related recovery catalog(if you use else in control files).So in April`s tape backup information is there in recovery catalog or control file? when execute LIST BACKUP command do you see that backup?
  • 8. Re: Delete old backup from Tivoli tape media
    Sunand Newbie
    Currently Being Moderated
    Hi,

    I am using control file , not catalog.If i use LIST BACKUP; i cannot see the old backup beyond retention period (3 days).But, same files are there in TAPE.Shall i have to set anything in TSM level?.

    Also , Could you tell me how the backup will be checked with control file for crosscheck or delete?.


    Thanks,
    Sunand
  • 9. Re: Delete old backup from Tivoli tape media
    Chinar Guru
    Currently Being Moderated
    sunand wrote:
    Hi,

    I am using control file , not catalog.If i use LIST BACKUP; i cannot see the old backup beyond retention period (3 days).But, same files are there in TAPE.Shall i have to set anything in TSM level?.

    Also , Could you tell me how the backup will be checked with control file for crosscheck or delete?.


    Thanks,
    Sunand
    It seems i found problem ;-) .So you can manually delete these from tape and do not need execute CROSSCHECK BACKUP , DELETE EXPIRED BACKUP because actually these backups information there is not in controlfiles.
  • 10. Re: Delete old backup from Tivoli tape media
    19041 Newbie
    Currently Being Moderated
    Hi

    Can you please advise how to delete the tsm backup directly (without deleting in rman catalog) through Tivoli

    I want to retain the backup entries in the rman catalog for evidence of backup taken

    Thanks
    cyril

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points