Upgrading your FairCom replication server environment from version 11.5 (RTG v2.5) to version 13 (RTG v5) requires four high-level steps:
- Shutdown Existing Version
- Install New Version
- Configure New Version
- Start New Version
Shutdown Existing Version
To ensure a safe and consistent upgrade, follow these steps to shut down your current environment:
- Have all clients cleanly exit.
- Perform a normal controlled shutdown of the primary server as described in point 2 of the FairCom upgrade guide:
- Use the server console, Windows toolbar, Windows Service, or command-line utilities (ctadmn or ctstop) to shut down the server.
- Block the ability of any clients to attach to the primary server.
- Change the primary server name/port in ctsrvr.cfg so that clients attempting to connect to the known server name/port will fail.
- Restart the primary server with no clients attached and allow a successful automatic recovery to take place.
- Shutdown the replication agent ctreplagent with the following command:
repadm -c shutdown -s FAIRAGENT
- Change replication agent configuration ctreplagent.cfg to reflect the primary server name/port change.
- Restart the replication agent ctreplagent.
- Monitor the progress of replication with the following command:
repadm -c getstate -s FAIRAGENT- Check the logpos values and wait for 3 or 4 consecutive entries (at least more than 2) where the log position didn't change, indicating that pending transactions have been replicated.
- Example output:
[fctech@test replication]$ ./repadm -c getstate -s FAIRAGENT c-treeACE(tm) Version 11.5.1.51923(Build-180302) Replication Agent Management Utility Copyright (C) 1992 - 2018 FairCom Corporation ALL RIGHTS RESERVED. s t lognum logpos state seqno time func y y 1 482689 source 2638 0 ctReplGetNextChange y y 1 494266 source 2713 0 ctReplGetNextChange y y 1 499230 source 2750 0 ctReplGetNextChange y y 1 499230 source 2754 0 ctReplGetNextChange y y 1 499230 source 2755 0 ctReplGetNextChange y y 1 499230 source 2756 0 ctReplGetNextChange
- Shutdown the primary server again.
- Shutdown the replication agent ctreplagent again:
repadm -c shutdown -s FAIRAGENT
- Change the primary server name/port in ctsrvr.cfg back to the original name/port.
- Change replication agent configuration ctreplagent.cfg to reflect the primary server name/port change.
- Perform a normal controlled shutdown of the replica server as described in point 2 of the FairCom upgrade guide.
Install New Version
Once all servers are stopped, proceed as follows:
- Remove all existing transaction logs and associated files (L*.FCS, S*.FCS, D*.FCS, I*.FCS, and *.FCT) as described in point 6 of the FairCom upgrade guide. Do not remove FAIRCOM.FCS unless specifically instructed.
- Install the new server binaries to both primary and replica locations as described in point 7 of the FairCom upgrade guide:
- Copy your new FairCom server directory into the existing one. Protect your ctsrvr.cfg and ctsrvr.set files to preserve custom settings. Additionally, move the existing configuration files ctsrvr.cfg and ctsrvr.set from the server/ directory to the config/ directory.
Configure New Version
After installing the new binaries, configure the environment as follows:
- Ensure both the primary and replica ctsrvr.cfg files include a REPL_NODEID entry each set to a unique ID in an IPv4 address format (e.g., xxx.xxx.xxx.xxx):
; source server configuration REPL_NODEID 10.0.0.1; target server configuration REPL_NODEID 10.0.0.2
- Ensure the replica ctsrvr.cfg contains:
PLUGIN cthttpd;./web/libcthttpd.so
- Ensure services.json (in the replica config/ directory) has the ctagent service enabled:
{ "serviceName": "ctagent", "serviceLibrary": "./agent/libctagent.so", "enabled": true },
- Ensure ctagent.json (in the replica config/ directory) looks exactly as follows:
{ "managed": false, "configurationFileList": [ "../config/ctreplagent.cfg" ] }
- Copy ctreplagent.cfg, target_auth.set, and source_auth.set from your previous installation to the replica config/ directory.
- Ensure ctreplagent.cfg (in the replica config/ directory) sets source_nodeid and target_nodeid to the unique IDs defined in step 1:
source_nodeid 10.0.0.1 target_nodeid 10.0.0.2
- Ensure ctreplagent.cfg (in the replica config/ directory) assigns a unique name to the unique_id for each replica server in your replication environment:
unique_id REPLAGENT
- Ensure target_auth.set and source_auth.set referenced in ctreplagent.cfg (in the replica config/ directory) are prepended with ../config/:
target_authfile ../config/target_auth.set source_authfile ../config/source_auth.set
- Optionally add log_file_name and log_level to ctreplagent.cfg (in the replica config/ directory):
log_file_name ctreplagent.log log_level info
Start New Version
You are now ready to start the upgraded environment:
- Start the primary server and the replica server.
Note There is no need to start the replication agent process ctreplagent separately, as in the new version it is embedded in the replica server.
Note on terminology:
Throughout this document, the terms 'primary server' and 'replica server' are used to describe the roles in the replication environment. In configuration files and replication agent settings, these are referred to as 'source' (primary) and 'target' (replica) respectively. Please consider 'primary' and 'source' as equivalent, and 'replica' and 'target' as equivalent, depending on the context.
For further details and troubleshooting, refer to the official FairCom documentation: Steps to upgrade FairCom server