Skip to main content

Quick tutorial for replication agent

Quickly install, configure, and test your replication installation

Abstract

Complete these steps to make sure your replication installation and configuration are working properly.

Complete these steps to make sure your replication installation and configuration are working properly.

  1. Install, configure, and start the primary server.

  2. Install the secondary server and configure it as follows:

    1. Add the following option to <faircom>\config\ctsrvr.cfg:

      PLUGIN ctagent;./agent/ctagent.dll
    2. Edit <faircom>\config\ctAgent.json to configure the agent as an unmanaged agent, and enable the replication agent manager.

      {
          "managed": false,
          "use_replication_agent_manager": true
      }
    3. Copy the following files from the <faircom>\drivers\ctree.c.replication\tutorials\config\secondary directory to the secondary server's <faircom>\config\ directory.

      ctreplagent.cfg
      deploy.cfg
      deployfilefilter.xml
      deployresyncfilelist.txt
      filefilter.xml
      resyncfilelist.txt
    4. Make the following changes in ctreplagent.cfg and deploy.cfg

      Change C:\faircomdb\primary\config to the configuration directory of your primary server
      Change C:\faircomdb\secondary\config to the configuration directory of your secondary server.
      Change FAIRCOMS to the server name and hostname of your source (primary) server.
      Change FAIRCOMT to the server name and hostname of your target (secondary) server.
      If your primary and secondary servers use different data directories, change the redirect option to the appropriate directory names. If the servers use the same directory name, remove the redirect option.
    5. Use the ctcmdset utility to create source and target authentication files and copy these files to the secondary server's configuration file directory.

  3. Start the secondary server.

  4. Create directories named subdir1 and subdir2 under the primary server's LOCAL_DIRECTORY.

  5. Create the test files on the primary server (replace user name, password, and server name with your settings):

    ctmtap fc mT mr aa hsubdir1\mark uADMIN pADMIN sFAIRCOMS@localhost
    ctmtap fc mT mr aa hsubdir2\mark uADMIN pADMIN sFAIRCOMS@localhost
  6. Edit and run the tutorial run_tutorial.bash example script. Script variables must first be edited to match your settings.

    ./tutorials/run_tutorial.bash <option>

    Where <option> is agent for the replication agent, source for the primary server, target for the secondary server.