RMAN / TDPO - How to EXPIRE backups?
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: RMAN / TDPO - How to EXPIRE backups?

Hybrid View

  1. #1
    Join Date
    Oct 2002
    Posts
    807

    RMAN / TDPO - How to EXPIRE backups?

    Anyone know how to expire backups in TDPO? What parameters need to be altered? No matter what I specify in the TSM expiration Policy / Management class, my backup tapes never seem to get deleted/reused..and thus my backups never EXPIRE?! They always appear as "AVAILABLE" (when I 'crosscheck').

    Note : I'm NOT looking to set retention policies in RMAN and then make them OBSOLETE and then delete these OBSOLETE backups. What I'm looking for is - that TSM automatically delete backups (or reuse tapes) that are older than a certain period of time. And then when I issue a "Crosscheck backup", I expect that RMAN will mark these backups that were not found in the MML as "EXPIRED".

    Jodie - you seem to use TDPO at your place. Any ideas?

    Thanks, Anand
    Last edited by Axr2; 05-17-2004 at 06:34 PM.

  2. #2
    Join Date
    Oct 2002
    Posts
    807
    Found a note on Metalink that says :

    "TSM does not (ever) expire backups; in order to remove old database backups from the RMAN catalog (and tape) it is necessary to use
    RMAN to "delete" the obsolete backups. "


    I'm on 5.2..wonder if that is still the case. Damn..

  3. #3
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Axr2,
    I'm on AIX 5.2 (I assume that what you meant when you said 5.2) and TSM still does not expire backups. It waits for RMAN to delete them.

    Also, be careful using crosscheck when backing up to tape. See this forum thread

    Good Luck

  4. #4
    Join Date
    Oct 2002
    Posts
    807
    Jodie,
    No, I meant TDPO version 5.2. That's Tivoli's newest version.

    Guess I'm gonna have to manually delete backups older than a certain day.

    Thanks for the link. I've got a few questions -

    Be VERY careful using Crosscheck. Like you said, the cross check won't find the backups (since they are on tape), so it will delete them from your catalog. At that point you can't use your backups again.

    This can also be the case when you back up directly to tape. We backed up to tape directly using TDP/TSM and ran a crosscheck. Then ALL of my backups were gone!

    It can also create a mess on tape if you use RMAN to actually delete the backup files. The catalog now thinks they are gone, but the are still out there "floating" on tape. Messy.
    Para 2 - Why would the crosscheck expire backups that you'd directly backed up to tape?! Sounds bizzare. Also, it appears to contradict what you just said in the current post - that "TSM still does not expire backups"??

    Para 3 - What do mean by "backup files"? Individual files or backup pieces? Btw, how did you know or verify that the deleted stuff still existed on tape afterwards?

    I'm interested in knowing how you maintain different retentions of your daily backups, monthly backups and yearly backups. Also, retentions of your archivelog files. It'll be great if you could send me your scripts at axr2@hotmail.com.

    I'm currently using different TAGS when initiating a daily, monthly or yearly backup (of the database). I need to retain my daily backups for a month, the qtrlies for an year, and year end backups for 2 years. I intend issuing the below commands to delete my backups.

    DELETE BACKUP TAG "DWDEV LEVEL 0 DLY BKUP" completed before 'SYSDATE-30';
    DELETE BACKUP TAG "DWDEV LEVEL 1 DLY BKUP" completed before 'SYSDATE-30';
    DELETE BACKUP TAG "DWDEV LEVEL 0 QTRLY BKUP" completed before 'SYSDATE-365';
    DELETE BACKUP TAG "DWDEV LEVEL 0 YRLY BKUP" completed before 'SYSDATE-730';

    This appears to do the job..except that I can't seem to verify on the TSM side that the backups indeed got deleted, and that the tapes were released for use again! Any ideas on how I could verify that?

    Thanks again.
    - Anand

  5. #5
    Join Date
    Oct 2002
    Posts
    807
    If your DELETE scripts look like the ones that I've listed above, how do you handle EXCEPTIONAL situations? Say your customer calls you to ask if you could retain last Wednesday's level 0 daily backup for 2 months? How do you do it?

    It happens to me all the time..
    Last edited by Axr2; 05-18-2004 at 01:20 PM.

  6. #6
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Originally posted by Axr2

    Para 2 - Why would the crosscheck expire backups that you'd directly backed up to tape?! Sounds bizzare. Also, it appears to contradict what you just said in the current post - that "TSM still does not expire backups"??
    TSM will not expire the backup with a crosscheck. What happens is that you do the cross check on Unix, and it can't "See" the backups since they are on tape. Therefore it marks them 'Expired' in RMAN. So they are still on tape, but RMAN doesn't like them. According to the documentation this should work with a media manager, but it didn't work with with TSM 2.1 (I think the versions went 2.1, 2.2, 5.1). It may work with newer versions... I haven't been willing to test it on my 5.1 server. I'd just recommend you test it on a NON-production database before you base any policy on it!


    Originally posted by Axr2

    Para 3 - What do mean by "backup files"? Individual files or backup pieces? Btw, how did you know or verify that the deleted stuff still existed on tape afterwards?
    I meant backup pieces... but to TSM, they are just files. To verfify that files exist/or are deleted, enter
    Code:
    show versions NODE_NAME *
    from the server administration page (command line). As far as seeing what tapes are released, you should ask your TSM admin. He/she can tell you. Quite frankly, you shouldn't worry about what tapes are available... just that your backups are are available.

    In case you rman catalog and TSM get out of sync - you can use the tdposync command (from unix) to sync them up. I haven't needed to use it yet, though.

    Originally posted by Axr2

    I'm interested in knowing how you maintain different retentions of your daily backups, monthly backups and yearly backups. Also, retentions of your archivelog files.
    I only work for a single company, and we have a pretty set backup policy. 30 days back.. that's it. So, I really don't have to deal with the different retention policies.. sorry!

    Here are a couple other basic commands that might be helpful in querying TSM (all from the TSM System Administration screen)

    To show what other background processes are running:
    q process

    Shows what's on a volume:
    q v VOLUME#

    Show Filesize:
    select distinct node_name,file_name,file_size from contents where node_name='NODE_NAME' order by file_name

    Good Luck

  7. #7
    Join Date
    Oct 2002
    Posts
    807
    Jodie,
    Thanks for your response. I'm yet to familiarize myself with the TSM commands. Our TSM admin is relatively new to this as well.

    The below statement has been running for the last 1 hour in TSM!
    select * from contents where node_name='DWDEV01_ORA' <- my node name.

    I'm gonna have to kill it. The io seems pretty high..We run a whole lot of file system backups (1.5 Tb worth) from TSM everyday. That could be why the table is so huge.

    Btw, what does a typical RMAN file_name (in the contents table) look like? Is this identical to the RMAN backupset piece name by any chance??

    - Anand

  8. #8
    Join Date
    Oct 2002
    Posts
    807
    Nevermind - I think I'm defaulting to a different node, when I log into TSM. That's the reason why the query hangs. I haven't figured out how to set it to the appropriate node..

    A "query contents" helped..it returned file_names which were identical to my RMAN piece names. As what one wd expect..

    I think I'm on the right track. I should be able to figure it out from here. Need to pore over the TSM admin manual..

    Thanks for your help, Jodie.
    - Anand

  9. #9
    Join Date
    Oct 2002
    Posts
    807
    Calling Jodie! Need your TSM expertise again. Can you compare your settings with mine?

    I'm running into a situation where my backups never get physically deleted/purged from TDP. They simply continue to sit in an "INACTIVE_VERSION" state in TSM for ever.

    When I issue a "delete backup" from RMAN,
    1) the "STATE" column in the TSM table "backups" changes from "ACTIVE_VERSION" to "INACTIVE_VERSION"
    (Do a select * from backups where node_name='YOUR_NODE_NAME'; )

    AND

    2) The "deactive_date" column in the "backups" table changes from blanks to "1900-01-01"! (What's 1900-01-01? Why doesn't it plug the correct date?)

    My management class settings are as follows :
    Verexists=9 (I also tried setting it to 1)
    Verdel=0
    Retextra=0
    Retonly=0

    (What are yours set to?)

    Per TDP documentation, the above settings ought to take care of changing the state from "INACTIVE_VERSION" to "EXPIRED". (But that doesn't happen in my case).

    And then when the "expire inventory" command is run by the TSM admin, TSM ought to purge the object from the TSM database and free up the storage space where the backup object resided.

    Aargh..I can't seem to get TSM to expire these INACTIVE backups.

  10. #10
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Axr2 -
    Sorry it took me so long - I was out of the office for a long Memorial Day weekend!

    Anyway - We have our settings to:
    VEREXISTS: 10
    VERDELETED: 0
    RETEXTRA: 10
    RETONLY: 0

    Our TSM Admin set these, so I can't speak too much about why they are set this way. But according to the Redbook
    If the retention for the backup object is set to retain zero inactive objects(retextra=1,verdel=0) or to retain inactive copies for zero days(retextra=0, retonly=0), the active backup object will change to the expired state as soon as the active backup is inactivated.
    You have retextra and retonly set to 0, so it should be working. I didn't spend a lot of time going through the Redbook, but it seems to have a lot of information regarding setting up TSM. Maybe it will have something that will help you.

    HTH
    Jodie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width