DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: RMAN Maintenance commands

Hybrid View

  1. #1
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620

    Unhappy RMAN Maintenance commands

    Hi all,

    I am a newbie in RMAN so seek openion about RMAN catalog maitenance commands.

    I am planning to run foll. commmands on every 1st,10th and 20th of every month.

    allocate channel for maintenance type disk;
    crosscheck backup of database;
    crosscheck backup of archivelog all;
    delete expired backup;
    release channel;
    exit

    RMAN Gurus, Pl. advise...

    Thanks in Adv.
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  2. #2
    Join Date
    Jul 2002
    Location
    California
    Posts
    128
    What are your backup plans?

    i.e. level 0 on sunday - level 1 M-F, etc...

    What are the retention periods?
    The retention will depend upon when and if they are copied to tape

    i.e 1, 2, 3 backup sets
    alapps

    Fast, Cheap, Reliable... Pick Two(2)

  3. #3
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796

    Re: RMAN Maintenance commands

    Originally posted by samdba
    Hi all,

    I am a newbie in RMAN so seek openion about RMAN catalog maitenance commands.

    I am planning to run foll. commmands on every 1st,10th and 20th of every month.

    allocate channel for maintenance type disk;
    crosscheck backup of database;
    crosscheck backup of archivelog all;
    delete expired backup;
    release channel;
    exit

    RMAN Gurus, Pl. advise...

    Thanks in Adv.
    Hi,

    1. Use a seperate database as the catalog.

    2. Read the RMAN concepts and Users guide.

    3. If then you are getting problem then ask cos no one can give you the exact scripts, you will have to modify them anyway according to your needs (for that you need to understand RMAN) , and you can find better scripts in the manuals itself, don't waste your time, read the Manuals... if you don't have then go to tahiti.oracle.com or http://dbasupport.com/oracle/resourc...Recovery/Rman/

    HTH
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  4. #4
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Hi guys,

    I thin that I have not presented my problem clearly. I am already taking my backups with RMAN (level 0 on FRI and level 1 rest of days). RMAN catalog is also on a diff. database. They are working fine.

    Now, I want to do some maintenance of RMAN catalog for the database, I am taking the backup like, deleting expired backups, marking the backups as unavailable if they do not exist on the disk/tape etc.

    For doing this, I put up above commands for seeking your concurrence.

    Thanks a lot.
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  5. #5
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    refer to http://download-west.oracle.com/docs...nc3.htm#430706

    It will solve all your maintenance related queries..

  6. #6
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Hi Sameer,

    Thanks for the link. I am going to use foll. commands.

    allocate channel for maintenance type disk;
    crosscheck backup of database;
    crosscheck backup of archivelog all;
    delete expired backup;
    release channel;
    exit

    As I understand, delete expired backup will delete catalog records for the backup piece it does not find on the backup location. In our case, we first take the backup on the disk and then on to the tape. After that, we delete backup from the disk. In that case, it will not find backup on the disk and will delete catalog records.

    Will it not create problem in case if we need to restore that backup piece?

    Pl. make me understand this.

    Thanks,
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  7. #7
    Join Date
    Jul 2002
    Location
    California
    Posts
    128
    Originally posted by samdba
    ...
    Thanks for the link. I am going to use foll. commands.

    allocate channel for maintenance type disk;
    crosscheck backup of database;
    crosscheck backup of archivelog all;
    delete expired backup;
    release channel;
    exit

    As I understand, delete expired backup will delete catalog records for the backup piece it does not find on the backup location. In our case, we first take the backup on the disk and then on to the tape. After that, we delete backup from the disk. In that case, it will not find backup on the disk and will delete catalog records.

    Will it not create problem in case if we need to restore that backup piece?
    ...
    That is correct sam. You will not be able to restore that backup piece since the crosscheck will not find it in the backup location.

    To use that backup piece, you would need to restore the catalog database to the point in time after the backups were taken but prior to the crosscheck that expired them.
    alapps

    Fast, Cheap, Reliable... Pick Two(2)

  8. #8
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620
    Hi alapps,

    I am sorry but I could not understand clearly what you are trying to say.

    Once, I issue 'DELETE EXPIRED...' command, it will delete all records from catalog repository where it finds 'expired' backup copies.

    So, if I need to perform the restore and that backup piece is not available on the disk (but there on the tape) and its records have been deleted from the catalog database, will I be able to perform 'restore' using that backup copy or not?

    Pl. explain.

    Thanks,
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  9. #9
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    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.

    So, I would just stay away from crosscheck if you are backing up to tape.

    I have a couple scripts to "maintain" the catalog (delete backups over XX days old, etc). If you are interested, please give me your email address.

    Good Luck!
    Jodie

  10. #10
    Join Date
    Jul 2002
    Location
    California
    Posts
    128
    Originally posted by samdba
    Hi alapps,

    I am sorry but I could not understand clearly what you are trying to say.

    Once, I issue 'DELETE EXPIRED...' command, it will delete all records from catalog repository where it finds 'expired' backup copies.

    So, if I need to perform the restore and that backup piece is not available on the disk (but there on the tape) and its records have been deleted from the catalog database, will I be able to perform 'restore' using that backup copy or not?

    Pl. explain.

    Thanks,
    Senario:
    - ... (Pre existing backups)
    - Backup level 0 on February 01
    - Backup level 1 on February 02
    - Backup level 1 on February 03
    - Backup level 1 on February 04
    - Backup level 1 on February 05
    - Backup level 1 on February 06
    - export rman catalog DB
    - delete older than 14 days
    - crosscheck
    - ... (1 month goes by)


    To restore to February 03, you would need to get the level 0 from February 01 and the level 1's for February 02/03. However, the rman catalog has been cleared via the crosscheck. The catalog would need to be imported from the export rman catalog DB step. This usually occurs when setting up a test environment from a production environment.

    As Jodie said, use scripts to maintain the catalog manually since you are storing your backups on tape.
    alapps

    Fast, Cheap, Reliable... Pick Two(2)

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