Replication tool: user guide
- 1 Replication tool distribution Package
- 2 FIX Antenna based application settings
- 3 Installation
- 3.1 For the Windows operating system
- 3.1.1 Client-Server Mode
- 3.1.2 For the Linux operating system
- 3.1.2.1 Client-Server Mode
- 3.1.2.1.1 Server console
- 3.1.2.1.2 cmd
- 3.1.2.2 Configure client instance(s) of the replication tool on the destination host(s):
- 3.1.2.2.1 Client console
- 3.1.2.3 Standalone Mode
- 3.1.2.1 Client-Server Mode
- 3.2 FIX Logs Replicator Properties
- 3.2.1 Server configuration
- 3.2.1.1 replication.server.port
- 3.2.1.2 replication.server.password
- 3.2.1.3 replication.server.login
- 3.2.1.4 replication.server.folders
- 3.2.1.5 replication.server.folder.default.recursive
- 3.2.1.6 replication.server.folder.default.path
- 3.2.1.7 replication.server.folder.default.maxItemsPerUpdate
- 3.2.1.8 replication.server.folder.default.filter
- 3.2.1.9 replication.server.folder.default.checkMinimalIndexFileSizeJAVA
- 3.2.1.10 replication.server.folder.default.regexpConfFileBindingJAVA
- 3.2.1.11 replication.server.folder.default.removeBackslashesInConfJAVA
- 3.2.1.12
- 3.2.1.13 replication.server.folder.AAA.recursive
- 3.2.1.14 replication.server.folder.AAA.path
- 3.2.1.15 replication.server.folder.AAA.maxItemsPerUpdate
- 3.2.1.16 replication.server.folder.AAA.filter
- 3.2.1.17 replication.server.timeoutMs
- 3.2.1.18 replication.server.filePollingIntervalM
- 3.2.1.19 replication.server.foldersPollIntervalS
- 3.2.1.20 replication.server.confsPollIntervalS
- 3.2.1.21 replication.server.terminateOnOpenSessionError
- 3.2.2 Client configuration
- 3.2.2.1 replication.client.host
- 3.2.2.2 replication.client.port
- 3.2.2.3 replication.client.login
- 3.2.2.4 replication.client.password
- 3.2.2.5 replication.client.folders
- 3.2.2.6 replication.client.folder.default.path
- 3.2.2.7 replication.client.folder.default.filter
- 3.2.2.8 replication.client.folder.default.recursive
- 3.2.2.9 replication.client.folder.AAA.path
- 3.2.2.10 replication.client.timeoutMs
- 3.2.2.11 replication.client.foldersPollIntervalS
- 3.2.2.12 replication.client.confsPollIntervalS
- 3.2.2.13 replication.client.heartBeatIntervalS
- 3.2.2.14 replication.client.postStatsIntervalM
- 3.2.2.15 replication.client.folder.default.maxItemsPerUpdate
- 3.2.2.16 replication.client.terminateOnOpenSessionError
- 3.2.3 Admintool configuration
- 3.2.3.1 replication.admintool.host
- 3.2.3.2 replication.admintool.port
- 3.2.3.3 replication.admintool.login
- 3.2.3.4 replication.admintool.password
- 3.2.3.5 replication.admintool.heartBeatIntervalS
- 3.2.4 Logger configuration
- 3.2.4.1 Log.File.RootDir
- 3.2.4.2 Log.Device
- 3.2.4.3 Log.DebugIsOn
- 3.2.4.4 Log.NoteIsOn
- 3.2.4.5 Log.WarnIsOn
- 3.2.4.6 Log.ErrorIsOn
- 3.2.4.7 Log.FatalIsOn
- 3.2.4.8 Log.Cycling
- 3.2.4.9 Log.File.Name
- 3.2.4.10 Log.File.Recreate
- 3.2.4.11 Log.File.AutoFlush
- 3.2.1 Server configuration
- 3.3 Command Line Options
- 3.4 Logging
- 3.5 Admin tool
- 3.5.1 Configuration:
- 3.5.2 Admintool Script Usage
- 3.6 Examples
- 3.1 For the Windows operating system
Replication tool distribution Package
The replication tool works on the following platforms: Windows (x64): Win7, Win8, Windows Server 2008, Windows Server 2012; Linux (x64): CentOS7, Ubuntu 16.04.
The distribution package of the Replication Tool is ZIP-archive for Windows and ZIP-archive for Linux containing the following files:
Windows
Script | Purpose |
|---|---|
bin/admintool.bat | runs the admin tool mode |
bin/b2b_replication.exe | application file |
bin/client.bat | runs replication client |
bin/client.service.install.bat | installs the replication tool as a Windows service in client mode |
bin/client.service.run.bat | runs the replication tool as a Windows service in client mode |
bin/client.service.stop.bat | stops the replication tool as a Windows service in client mode |
bin/client.service.uninstall.bat | uninstalls the replication tool as a Windows service in client mode |
bin/server.bat | runs replication server |
bin/server.service.install.bat | installs the replication tool as a Windows service in server mode |
bin/server.service.run.bat | runs the replication tool as a Windows service in server mode |
bin/server.service.stop.bat | stops the replication tool as a Windows service in server mode |
bin/server.service.uninstall.bat | uninstalls the replication tool as a Windows service in server mode |
bin/standalone.bat | runs the standalone mode |
bin/replication.properties | properties file |
doc/Replication tool.docx | instructions file |
Linux
Script | Purpose |
|---|---|
bin/admintool.sh | runs the admin tool mode |
bin/b2b_replication | application file |
bin/server.sh | runs replication server |
bin/client.sh | runs replication client |
bin/standalone.sh | runs the standalone mode |
bin/linux_replication.properties | properties file |
doc/Replication tool.docx | instructions file |
After the first launch of the replication tool, the following files will appear in the setup folder:
b2b_replication.pid - contains a process identifier, it is used by replication tool control scripts.
persistent.properties - stores statuses of FIX sessions being replicated.
replication.log - replication tool log file.
FIX Antenna based application settings
For correct usage of the Replication tool, the user must set the several properties of the current FIX Antenna-based application.
The settings for the FIX Antenna C++-based application
Property Name | Prohibited Value(s) | Allowed Value(s) |
|---|---|---|
StorageType | transient splitPersistent null | Persistent PersistentMM |
MessageStorage.TimestampUnit | microsecond nanosecond | millisecond |
LogIncomingMessages | false | true |
The settings for the FIX Antenna Java-based application
Property Name | Prohibited Value(s) | Allowed Value(s) |
|---|---|---|
storageFactory | SlicedFileStorageFactory InMemoryStorageFactory | FilesystemStorageFactory MMFStorageFactory |
incomingStorageIndexed | false | true |
outgoingStorageIndexed | false | true |
timestampsInLogs | false | true |
Resetting sequence numbers in the FIX Antenna Java's session is not supportable. A new session must be created instead.
Installation
RT supports two main working modes:
Client-server mode allows synchronizing files between the primary and backup servers in real time.
Standalone mode allows copying files on the same machine in real time.
A detailed description of the setup process for each mode is given below.
For the Windows operating system
Client-Server Mode
A client-server mode is used in the case when there is a need to replicate data to a different host(s).
The corresponding installation process is described below.
Configure the server instance of the replication tool on the host where the primary files are created:
Unzip the distribution package into the home directory of the replication tool.
Make the following changes in the Server configuration section of the replication.properties configuration file:
Set replication.server.port where the server will listen to connections from clients. Make sure the port is open for external connections on your firewall.
Set replication.server.login and replication.server.password. Make sure you use the same values when configuring the client.
Define the location of logs to be replicated (source directory) and change path properties accordingly:
List aliases of the logs folders to be replicated in the replication.server.folders property.
If you replicate one directory you can leave this property empty.
Set the default path to the source logs directory in the replication.server.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.
Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias.
Start the Replication tool in server mode for Windows.
Start the replication manually. You can use the server.bat script from the bin folder of the distribution package. As well, the command "b2b_replication.exe" is used to start the replication tool server.
Start the replication as a Windows service. For the installation of the Replication Tool as a Windows service and schedules its automatic launch, the command "b2b_replication.exe --installService -n <ServiceServerName>" should be used or the file "server.service.install.bat". Then the user can start the installed service by using the Windows application service or type the command "%SystemRoot%\system32\net.exe start <ServiceServerName>" or use the file "server.service.run.bat".
If the server is started successfully you will see the following message in the console and in the replication.log
Server console
[NOTE] 20141016-10:18:11.460 [7804] [ReplicationServer] - Waiting for incoming connection.Make sure the port is open for external connections on your firewall.
Make sure the server is listening to clients on the port specified using the following command:
cmd
C:\B2BITS\replication_tool>netstat -na | find "1090"
TCP 0.0.0.0:1090 0.0.0.0:0 LISTENINGConfigure client instance(s) of the replication tool on the destination host(s):
Unzip distribution package into the home directory of the replication tool.
Make the following changes in the "Client Configuration" section of the replication.properties configuration file:
Set replication.client.host and replication.client.port . Make sure you use the same values as for the server replication.server.port property.
Set replication.client.login and replication.client.password. Make sure you use the same values as for the server replication.server.login and replication.server.password property.
Define the location of logs to be replicated (source directory) and change path properties accordingly:
List aliases of the logs folders to be replicated in the replication.client.folders property.
Folders' aliases should match the ones from the replication.server.folders list from the server configuration file. If the property is empty or not specified, all folders represented by the server are accepted and replicated into the default destination folder.
Set the default path to the source logs directory in the replication.client.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.
Set path to each directory being replicated in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from replication.client.folder.default.path property.
If you skip this step, the default destination directory will be used for all logs being replicated.
Start the replication tool in client mode for Windows.
Start the replication manually. You can use the client.bat script from the bin folder of the distribution package. As well, the command "b2b_replication.exe --client" is used to start the replication tool client.
Start the replication as a Windows service. For the installation of the Replication Tool as a Windows service and schedules its automatic launch, the command "b2b_replication.exe --installService -n <ServiceClientName> --serviceStartArgs --client" should be used or the file "client.service.install.bat". Then the user can start the installed service by using the Windows application service or type the command "%SystemRoot%\system32\net.exe start <ServiceClientName>" or use the file "client.service.run.bat".
If the client instance(s) is started successfully and set a connection to the server you will see the following message in the console and in the replication.log:
Client console
[NOTE] 20141016-10:35:31.623 [5508] [ReplicationClient] - Connected to server.Standalone Mode
Standalone mode is a mode when the client (subscriber) and server (publisher) are running within the same process. There is no TCP/IP connection in this mode. Standalone mode is preferable in a case when logs being replicated and copy should be located on the same machine. In order to set up the replication tool you need:
Unzip distribution package into the home directory of the replication tool.
Define the location of logs to be replicated (source directory). Change server configuration in the replication.properties configuration file accordingly:
List aliases of the logs folders to be replicated in the replication.server.folders property.
If you replicate one directory you can leave the property empty.
Set the default path to the source logs directory in the replication.server.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.
Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias.
Create directory (or directories) to store logs copy (destination directory(ies)). Change client configuration in the replication.properties configuration file accordingly:
Set default path to the destination directory in the replication.client.folder.default.path property.
Set destination directory for each source directory in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property. If you skip this step, the default destination directory will be used for all logs being replicated.
Start the replication process for Windows.
Start the replication manually. You can use the standalone.bat script from the bin folder of the distribution package. As well, the command "b2b_replication.exe --standalone" is used to start the replication tool in standalone mode.
Start the replication as a Windows service. For the installation of the Replication Tool as a Windows service and schedules its automatic launch, the command "b2b_replication.exe --installService -n <ServiceStandaloneName> --serviceStartArgs --standalone" should be used. Then the user can start the installed service by using the Windows application service or type the command "%SystemRoot%\system32\net.exe start <ServiceStandaloneName>".
For the Linux operating system
Client-Server Mode
A client-server mode is used in the case when there is a need to replicate data to a different host(s).
The corresponding installation process is described below.
Configure server instance of the replication tool on the host where the primary files are created:
Unzip distribution package into the home directory of the replication tool.
Make the following changes in the "Server configuration" section of the linux_replication.properties configuration file:
Set replication.server.port where the server will listen to connections from clients. Make sure the port is open for external connections on your firewall.
Set replication.server.login and replication.server.password. Make sure you use the same values when configuring client.
Define the location of logs to be replicated (source directory) and change path properties accordingly:
List aliases of the logs folders to be replicated in the replication.server.folders property.
If you replicate one directory you can leave this property empty.
Set the default path to the source logs directory in the replication.server.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.
Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias.
Start the replication tool in server mode for Linux.
Run server.sh to start the replication process or use the command "./b2b_replication --propfile=./linux_replication.properties".
If the server is started successfully you will see the following message in the console and in the replication.log
Server console
[NOTE] 20141016-10:18:11.460 [7804] [ReplicationServer] - Waiting for incoming connection.Make sure the port is open for external connections on your firewall.
Make sure the server is listening to clients on the port specified using the following command:
cmd
C:\B2BITS\replication_tool>netstat -na | find "1090"
TCP 0.0.0.0:1090 0.0.0.0:0 LISTENINGConfigure client instance(s) of the replication tool on the destination host(s):
Unzip distribution package into the home directory of the replication tool.
Make the following changes in the "Client Configuration" section of the linux_replication.properties configuration file:
Set replication.client.host and replication.client.port . Make sure you use the same values as for the server replication.server.port property.
Set replication.client.login and replication.client.password. Make sure you use the same values as for the server replication.server.login and replication.server.password property.
Define the location of logs to be replicated (source directory) and change path properties accordingly:
List aliases of the logs folders to be replicated in the replication.client.folders property.
Folders' aliases should match the ones from the replication.server.folders list from the server configuration file. If the property is empty or not specified, all folders represented by the server are accepted and replicated into default destination folder.
Set the default path to the source logs directory in the replication.client.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.
Set path to each directory being replicated in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from replication.client.folder.default.path property.
If you skip this step, the default destination directory will be used for all logs being replicated.
Start the replication tool in client mode for Linux.
Run client.sh to start the replication process or use the command "./b2b_replication --client --propfile=./linux_replication.properties".
If the client instance(s) is started successfully and set a connection to the server you will see the following message in the console and in the replication.log:
Client console
[NOTE] 20141016-10:35:31.623 [5508] [ReplicationClient] - Connected to server.Standalone Mode
Standalone mode is a mode when the client (subscriber) and server (publisher) are running within the same process. There is no TCP/IP connection in this mode. Standalone mode is preferable in a case when logs being replicated and copy should be located on the same machine. In order to set up the replication tool you need:
Unzip distribution package into the home directory of the replication tool.
Define the location of logs to be replicated (source directory). Change server configuration in the linux_replication.properties configuration file accordingly:
List aliases of the logs folders to be replicated in the replication.server.folders property.
If you replicate one directory you can leave the property empty.
Set the default path to the source logs directory in the replication.server.folder.default.path property.
If you replicate one directory, use it here. If you replicate several directories, use one of them here.
Set path to each directory being replicated in the corresponding replication.server.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property.
If you replicate one directory, you can skip this step. The default value set in the replication.server.folder.default.path property will be used instead.
If you replicate several directories set path to each of them under corresponding alias.
Create directory (or directories) to store logs copy (destination directory(ies)). Change client configuration in the replication.properties configuration file accordingly:
Set default path to the destination directory in the replication.client.folder.default.path property.
Set destination directory for each source directory in the corresponding replication.client.folder.AAA.path property, where AAA is the directory alias from the replication.server.folders property. If you skip this step, the default destination directory will be used for all logs being replicated.
Start the replication process for Linux.
Start the standalone.sh or use the command "b2b_replication --standalone --propfile=./linux_replication.properties" to start replication process.
FIX Logs Replicator Properties
Property | Is Required | Default Value | Description |
|---|---|---|---|
Server configurationThe section is used in Standalone mode and Client-Server mode on the server side. | |||
replication.server.port | Y | 1090 | Server listen port. |
replication.server.password | Y | - | A password that must be used by the client to be able to log in to the server. |
replication.server.login | Y | - | A client's login that must be used by the client to be able to log in to the server. |
replication.server.folders | N | - | A comma-separated list of aliases of folders to be monitored. If not specified or empty, default settings are used. If not empty "replication.server.folder.AAA.path" property for each folder from the list should be specified, where "AAA" is the folder alias. |