.
Eloquence B.08.20 contact contact

Documentation / Eloquence Replication

Eloquence Replication Checklist

 
.
 

Step-by-step checklist for slave server setup / re-sync

The following checklist shows step-by-step instructions for setting up or re-synchronizing a slave server.

There are three sections in the checklist: section A with initial steps for setting up a slave server, section B with initial steps for re-synchronizing a slave server, and section C with steps that are common to both tasks. Either perform the steps of section A and C or the steps of section B and C, depending on your task.

  1. initial steps specific to slave setup

    1. Adjust master server config to enable forward logging and replication

      ...
      [Replication]
        Role = Master
      ...
      [ForwardLog]
        FwLog = /example/master/logs/fw-%N.log
        EnableAudit=1
      ...

      Note: using EnableAudit=1 is optional, but typically useful.

    2. Restart master server to activate config changes

      $ /etc/init.d/eloq82 restart MASTER_ID

      Note: the above example is for Linux, on HP-UX use /sbin/init.d/eloq82.

    3. Create slave server config (typically based on the master config)

      ...
      [Replication]
        Role = Slave
      ...
      [ForwardLog]
        FwLog = /example/slave/logs/fw-%N.log
      ...

      Note: using FwLog on the slave is optional, but typically useful.

      Important: when running master and slave servers on the same system, you may also need to adjust the following config options for the slave to prevent conflicts with the master: Service, ServiceHttp, LogFile, StatFile, SessionStatFile, as well as the path names in the [Volumes] section. Additionally, you may also want to use different values for Title, UID and GID on the slave.

      When running master and slave on different systems, you may need to adjust [db-access].

    4. (continue with the steps in section C of this checklist)

  2. initial steps specific to slave re-sync

    1. Stop the dbrepl process on the master system, if running

      $ fuser -u /opt/eloquence/8.2/bin/dbrepl
      /opt/eloquence/8.2/bin/dbrepl:  7619e(eloqdb)
      
      $ kill 7619
    2. Shutdown the slave database server, if running

      $ /etc/init.d/eloq82 stop SLAVE_ID

      Note: the above example is for Linux, on HP-UX use /sbin/init.d/eloq82.

    3. (continue with the steps in section C of this checklist)

  3. common steps for both, setup and re-sync

    1. Start online backup mode on the master server

      $ dbctl -u dba backup start

      Note: this example uses online backup mode, which is less intrusive than using offline backup

    2. Copy the DATA volumes to backup media, temporary location or directly to the slave system

      $ cd /example/master/db ; tar cvf /dev/tape data*.vol

      Note: the above tar just serves as an example, your environment might use a different method

    3. Stop online backup mode on the master server

      $ dbctl -u dba backup stop
    4. Restore the master data volumes on the slave system, unless copied directly during step C-2

      $ cd /example/slave/db ; tar xvf /dev/tape

      Note: the above tar just serves as an example, your environment might use a different method

    5. Create a fresh LOG volume for the slave server (unless already in place)

      $ dbvolextend -c /example/slave/db/eloqdb.cfg -v -R
    6. Start the slave server (and check startup messages in its LogFile)

      $ /etc/init.d/eloq82 start SLAVE_ID

      Note: the above example is for Linux, on HP-UX use /sbin/init.d/eloq82.

    7. Start the dbrepl process on master server to begin catch up and replication

      $ dbrepl -c /example/master/db/eloqdb.cfg -v SLAVE_HOST:SLAVE_PORT

      Note: for running the above in background, you might use nohup, for example:

      $ nohup dbrepl ... >>/example/master/logs/repl.log 2>&1 &

      Instead of the above approach of directly invoking dbrepl, using shell features to ensure background processing and output redirection, you may also use a different approach on Eloquence B.08.20 and newer...

      1. create or edit a replication config like /etc/opt/eloquence/8.2/repl.cfg
      2. add a replication instance for the above in /etc/sysconfig/eloquence82
      3. use the /etc/init.d/eloq82 script to start your specific REPL_ID

      Note: the above example is for Linux, on HP-UX the directories differ slightly:

      1. create or edit a replication config like /etc/opt/eloquence/8.2/repl.cfg
      2. add a replication instance for the above in /etc/rc.config.d/eloquence82
      3. use the /sbin/init.d/eloq82 script to start your specific REPL_ID

      (also see this B.08.20 release notes section for details)

    8. Optionally monitor replication status on master and slave with dbctl

      $ dbctl -h MASTER_HOST -s MASTER_PORT replication status
      $ dbctl -h SLAVE_HOST -s SLAVE_PORT replication status

      Note: on the slave you may also find "dbctl replication monitor" useful for scripting


Please note that the above checklist focuses on setup or re-sync of the slave server and thus does not include any housekeeping procedures for the master and slave servers such as deleting forward logs on the master and or slave systems, once they are no longer needed by dbrepl, have been stored as part of regular backups, and have optionally been processed for database auditing.


 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:  2013-04-22  
  Copyright © 2006-2013 Marxmeier Software AG