Quick tutorial for replication agent
Quickly install, configure, and test your replication installation
This tutorial shows how to start a sample replication environment with a FairCom unmanaged replication agent. A replication agent is said to be unmanaged when it is not controlled by FairCom Replication Manager but acts as server thread dealing with the source server data. When not using the FairCom Replication Manager the configuration is up to the end user: this document shows the initial steps to create a sample replication environment. For simplicity both the servers are running on the same machine, of course a real replication environment is normally expected to run on different machines, in fact the sake of this tutorial is to familiarize with the unmanaged replication agent components. Please also consider that in this tutorial the unmanaged replication agent uses a special mode called Replication Agent Manager a special mode implemented to improve the threads management of the unmanaged replication agent: the Replication Agent Manager has slight differences in the way files are resynced and/or deployed to the target server.
Install, configure, and start the primary server.
Install the secondary server and configure it as follows:
Add the following option to <faircom>
\config\ctsrvr.cfg
:PLUGIN ctagent;./agent/ctagent.dll
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 }
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
Make the following changes in
ctreplagent.cfg
anddeploy.cfg
Change C:\faircomdb\primary\config
to the configuration directory of your primary serverChange 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. Use the
ctcmdset
utility to create source and target authentication files and copy these files to the secondary server's configuration file directory.
Start the secondary server.
Create directories named
subdir1
andsubdir2
under the primary server's LOCAL_DIRECTORY.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
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.