Forum Discussion

SnirA's avatar
SnirA
Level 4
11 years ago

how to Backup db2 with hadr

Hi,

I got a question Regarding backup of db2 that uses hadr.

 

I didnt see any explain on this from netbackup documentation side and i been wondering if there is any "best practice" on how to do it.

 

Can you please give me some tips about it ?

 

Thank you!

  • yes, its true.

    Already did it and its working fine.

     

    we are not using ipaddress to backup the cluster node as there are 9 databases on those 2 nodes.

    we just created a mini script inside the db2_Backup script.

    if answer is true db2 run the backup if its false it exist with status 0.

     

  • don't know db2 hadr, but guess it is something like oracle dataguard where you usually only back up the primary database as the secondary database is a copy of the primary.

    Have you checked if there a best a TSM best practice for db2 hadr ?  That might converted to netbackup

    Hope this helps a little

  • Hello,

    I think that db2 hadr backup should be the same like regular backup of db2.

    The only different is like Michael comment is the you need to backup the primary server.

    Thus, you configure the exactly scripts in bouth servers that has the hadr and backup the client virtual name of the hadr so you will backup always the primary server.

     

     

  • My understanding of hadr is a clustered installation that includes replication to a DR/remote site. Is that how it is configured in your environment?

    Do you fail over production to the DR site on a regular basis, or only in the event of a disaster?
    Do you only need to backup the cluster on the production site?

    Clustered installations need NBU to be installed and configured on each node.
    Ensure successful forward and reverse lookup between master, media server(s) and cluster nodes as well as the Virtual hostname for the DB2 instance.

    Specify the virtual DB2 name as the client name in the policy.
    Ensure backup scripts exist on both nodes in same location or on shared storage. Same for db2.conf.
     
    Use these steps in NBU for DB2 manual to create/update bp.conf on cluster nodes:
    Configuring bp.conf files in a cluster environment
  • pls let us know more about existing environment ...." Regarding backup of db2 that uses hadr"

  • Yogesh9881,

     

    there are 2 aix machines and they both defined with hadr, one is active one is passive.

     

    There is no Cluster IP that will jump between them.

  • A cluster with no failover IP or failover hostname? surprise I have never heard of such a cluster....

    How are applications and/or users connecting to the clustered instance? How is a failover handled if there is not a single IP/hostname that will failover with the database?

    If there is really no failover IP/hostname, you will need to configure the db2 instance the same as a standalone instance.

    Configure another policy for the failover node (node2), but deactivate the policy. You will have to rely on server owners and/or dba's to notify you when a failover has taken place, so that you can activate the policy for node2 and deactivate the policy for node1.

  • our solution was to add in each db2 script a test to check if  its the active instance of the db.

    the backup run according to the result of the script.

  • OK 

    i am understanding / assuming,,,,,,

    you want to configure hot backup for DB2 database which is configured in cluster mode

    let us know if this is true indecision ...

     

  • Curious about you setup and how you script check of it is the active instance

    My understanding so far:

    One AIX machine with the primary db2 instance, normally active and inactive in a DR situation

    One AIX machine with the secondary db2 instance, normally inactive and active in a DR situation

    With some kind of replication from primary to secondary db2 at normal operation

    Regards

    Michael

  • yes, its true.

    Already did it and its working fine.

     

    we are not using ipaddress to backup the cluster node as there are 9 databases on those 2 nodes.

    we just created a mini script inside the db2_Backup script.

    if answer is true db2 run the backup if its false it exist with status 0.