Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2010

    Unanswered: Restoring from HADR

    Firstly I am using 9.7.9a in Linux 6.

    We are going to run a load simulation test in prod and need to plan in the event of a rollback. Right now the plan is to run a backup before the test start on the primary db and turn off the secondary db. If there are no issues we just restart the secondary db and let the logs apply. But if we need to rollback we were looking at either restoring the primary using the backup OR take a backup of the secondary db and use this to restore the primary. The issue with the later is that we wouldn't want the secondary db to have logs applied from the primary db once we db2start the secondary.

    My question is are there any gotchas I need to plan for when restoring an HADR? Can I just restore the primary and db2start the secondary db server and I'm done? or do I need to restore both servers using my backup file from the Primary? Can I use the secondary server as a backup db?



  2. #2
    Join Date
    Nov 2010
    I found this link on how to set up HADR or takeover HADR:

    I looking for some way not to have to rebuild HADR if I need to rollback changes on the Primary db via a restore from backup.

    Also do I need to take an offline backup for HADR recovery? Right now the plan is just to take a online backup.

  3. #3
    Join Date
    Jul 2013
    Moscow, Russia
    Provided Answers: 55
    You can try the following:
    1. Takeover hard on standby
    2. Deactivate db on both and move the archived logs on primary to use them later
    3. Restore db on the primary after testing, remove all logs from active & archive paths with the same & greater numbers as your saved logs at step 2
    4. Move the logs saved at step 2 back
    5. On primary: Start hard as standby
    6. On standby: start hadr as primary

    I'm not 100% sure, but it should work...

  4. #4
    Join Date
    Dec 2007
    Richmond, VA
    Provided Answers: 5
    Based on your description sounds like you want to make your changes on primary, but not sure if you want them applied on standby yet. If that is the case, I think what you are wanting to do is something like:

    1. Deactivate DB on standby server.
    2. Stop HADR on Primary
    3. Perform your changes on Primary
    4. Verify your changes

    Do wish to proceed with your changes?
    5. Start HADR on primary
    6. Activate DB on your standby

    5. Perform HARD takeover on standby
    6. Perform Restore on old Primary and bring up as standby in HADR config
    7. Once in Peer mode can takeover on original Primary or leave as is.

    Good luck

Posting Permissions

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