Configuring FMS Replication
Replication is configured in the configuration file (CygNet\Services\FMS\fms.cfg) for each affected service. Depending on what role the service plays, different keywords will apply.
Required Configuration File Keywords for Replication
For each involved service, its replication behavior and relationship is defined by several keywords in the FMS configuration file.
- The details of data synchronization between services are contained in the Data Synchronization Keywords section of the configuration file.
- The extent of data retention for each service is determined by the value configured in the Database Info Keywords section of the configuration file.
Required Data Synchronization Keywords
In the Data Synchronization Keywords section of the configuration file, no replication is initially configured (by default), and all data synchronization keywords in the configuration file are commented out. Uncomment only the applicable keywords necessary for each service, and enter appropriate values to define the replication relationships desired. See Data Synchronization Keywords in the FMS Configuration File Keywords topic for more information.
The following is an overview of the keywords that are appropriate for each replication service role you decide to set up.
| Data Synchronization Keyword | Master FMS Service | DR Slave FMS Service | Business Slave FMS Service |
|---|---|---|---|
|
Required |
Required |
Required |
|
|
Required |
Required |
Required |
|
|
N/A; leave commented |
Required |
Required |
|
|
Required in replication mode, when designating a DR Slave service N/A when designating Business Slave service(s); leave commented |
N/A; leave commented |
N/A; leave commented |
|
|
N/A; leave commented |
Required |
Required |
|
|
Required when in redundancy mode |
Required when in redundancy mode |
Required when in redundancy mode |
|
|
N/A; leave commented |
Optional |
Optional |
|
|
N/A; leave commented |
Optional |
Optional |
|
|
N/A; leave commented |
Optional |
Optional |
Required Database Info Keywords
In the Database Info Keywords section of the configuration file, the DATA_RETENTION keyword must also be properly specified.
- For the Master service, the DATA_RETENTION keyword value determines how many days of data will be retained in the service, when expired data is purged via database maintenance commands.
- For the DR Slave service, the Master service determines its retention value, since their data must match exactly.
- For Business Slave service(s), the DATA_RETENTION keyword value determines how many days of data will be replicated from the Master service. A Business Slave service may have a different DATA_RETENTION keyword value specified than the Master service, since their data requirements may be quite different. When the Master and Business Slave services have different keyword values, the system will use the smaller of the two values to determine days of data replicated to the Business Slave service.
Example
If the Master service has a 180 day retention period, and the Business Slave service has a 5 year retention period, then only the most recent 180 days of data in the slave service can be validated.
See Database Info Keywords in the FMS Configuration File Keywords topic for more information.
The following is an overview of what the DATA_RETENTION keyword values mean for each replication service role you decide to set up.
| Data Synchronization Keyword | Master FMS Service | DR Slave FMS Service | Business Slave FMS Service |
|---|---|---|---|
|
Required Specifies the number of days of data to be retained in the database, when expired device data is purged during database maintenance. |
Required Specifies the number of days of data to be replicated from the Master service to the DR Slave service. Note: The value must equal the value set for the Master FMS Service. Also specifies the number of days of data to be retained in the database, when expired device data is purged during database maintenance. |
Required Specifies the number of days of data to be replicated from the Master service to the Business Slave service. Note: If the value is different from the value of the Master FMS Service, the system will use the smaller of the two values. Also specifies the number of days of data to be retained in the database, when expired device data is purged during database maintenance. |
Using the Quick Database Comparison Feature
You may optionally decide to copy the Master service database over to a Slave service prior to setting up replication, and then use the quick database comparison feature to save time.
Note: Use this keyword with caution, as it is possible to get a false positive on two databases that aren’t exactly the same.
Beginning replication from an existing FMS could take a prohibitively long time, to run a line-by-line comparison against the potentially large size of an existing FMS database. If desired, to shorten the initial synchronization time for the replicated service, the database of the Master FMS can be duplicated over to the replicated (Slave) site before starting the replicated service. You can then choose to enable the quick database comparison feature in the replicated service's configuration file, to allow the service to make a quick comparison and start the service.
To Enable Quick Database Comparison in a Replicated Slave Service
- On your host server, locate the configuration file for the FMS service(s) that will be your DR Slave or Business Slave service(s). Open the CygNet\Services\FMS folder and locate the fms.cfg file.
- Open the configuration file fms.cfg for the Slave service, locate the Data Synchronization Keywords section, and set the value of the DS_QUICK_DB_COMPARE keyword to TRUE.
Once the replicated service starts, a quick validation check will be done to verify that the two databases (Master and Slave) are equal. This will prevent a full row by row comparison of the two databases, which may take a long time on a large database.
Enabling Replication
Replication must be enabled and defined in the configuration file for each service that is part of the FMS replication relationship.
To Enable Replication
- On your host server, locate the configuration file for each service involved in the replication relationship. Open the CygNet\Services\FMS folder and locate the fms.cfg file.
- Master service - Open the configuration file fms.cfg of the Master service and, in the Data synchronization Keywords section, do the following.
- Set the value field of the DS_MODE keyword to REPLICATION.
- Set the value of DS_ROLES to REPL_MASTER.
- If you are defining a disaster recovery slave, set the value of the DS_REPL_SLAVE keyword. Type the [Domain]Site.Service for the DR Slave service into the value field.
- Leave the value of the DS_CHECK_INTERVAL keyword commented.
- DR Slave service - Open the configuration file fms.cfg of the DR Slave service and, in the Data synchronization Keywords section, do the following.
- Set the value field of the DS_MODE keyword to REPLICATION.
- Set the value of the DS_ROLES keyword to REPL_SLAVE_DR.
- Set the value of the DS_REPL_MASTER keyword. Type the [Domain]Site.Service for the Master service identified in step 2 into the value field.
- Set the value of the DS_CHECK_INTERVAL keyword to define the frequency at which the DR Slave service will check for changes in the Master service. Type the desired check interval value (in seconds) into the value field. This field cannot be left blank; it requires a value between 10 and 36000 seconds.
- If you want to enable the quick database comparison feature, set the value of the DS_QUICK_DB_COMPARE keyword to TRUE. If not specified, the default value will be FALSE. See Using the Quick Database Comparison Feature for more information.
- If you want to define a blackout period, during which no replication occurs, set the values for the DS_BLACKOUT_START and DS_BLACKOUT_END keywords. See Blacking Out Replication for more information.
- Business Slave service - Open the configuration file fms.cfg of each Business Slave service and, in the Data synchronization Keywords section, do the following.
- Set the value field of the DS_MODE keyword to REPLICATION.
- Set the value of DS_ROLES to REPL_SLAVE_BUSINESS.
- Set the value of the DS_REPL_MASTER keyword. Type the [Domain]Site.Service for the Master service identified in step 2 into the value field.
- Set the value of the DS_CHECK_INTERVAL keyword to define the frequency at which the Business Slave service will check for changes in the Master service. Type the desired check interval value (in seconds) into the value field. This field cannot be left blank; it requires a value between 10 and 36000 seconds.
- If you want to enable the quick database comparison feature, set the value of the DS_QUICK_DB_COMPARE keyword to TRUE. If not specified, the default value will be FALSE. See Using the Quick Database Comparison Feature for more information.
- If you want to define a blackout period, during which no replication occurs, set the values for the DS_BLACKOUT_START and DS_BLACKOUT_END keywords. See Blacking Out Replication for more information.
Blacking Out Replication
Since you will need to accommodate time required for database backups or other functions (e.g. your FMS is configured to do a majority of data polls at a particular part of the contract day), it may be helpful to black out replication during such periods to prevent a performance burden on the system. Replication blackouts can optionally be configured in the configuration file of any slave service.
To Black Out Replication
- On your host server, locate the configuration file for each service for which you want a blackout scheduled. Open the CygNet\Services\FMS folder and locate the fms.cfg file.
- Open the configuration file fms.cfg of each Slave service for which you want a blackout scheduled, to define a time window during which no replication checks will be initiated. Appropriate values are in the form “HH:MM” in 24-hour time notation, for the host server.
- Set the value for the DS_BLACKOUT_START keyword to define the start time of the blackout window.
- Set the value for the DS_BLACKOUT_END keyword to define the end time of the blackout window.
Example
If your contract hour is 9 a.m. and polling generally takes under five hours, you might want a DS_BLACKOUT_START value of 09:00 and a DS_BLACKOUT_END value of 14:00.
Monitoring FMS Replication
To monitor replication status in the FMS Console window, use the F4:Repl view. The console view displays the current status of the replication, the amount of data replicated, the estimated amount to replicate, and other helpful information. See CygNet Console for more information.
Most of the data on this view is also available via CygNet Explorer, using service info keywords available in the Service Details View, or through SVCMON points.


