This article describes the basics of how to install and configure a SystemWeaver Mirror Server. The server installation for a mirror server is the same as for the main server. The difference is only in the configuration in the swServer.ini. 


Prerequisites


Installing the Mirror Server Application

As mentioned above, the mirror server installation is the same as the main server installation. 

  1. Navigate to your delivery of SystemWeaver. 
  2. Take a copy of the Server directory for the mirror server installation. 

    Example SystemWeaver Delivery
     
  3. On the server machine(s) designated as the mirror server(s), create a directory called, e.g., MirrorServer. 
  4. Place the copy in the MirrorServer directory on the server machine(s) designated as the mirror server(s). A swServer.ini file should also be placed in this directory. You will use this to configure the mirror server.

Creating a Cache File

Each mirror server installation will need to have its own cache file located on the same server machine. 


The steps for creating a cache file are described in How to Create a Cache File for Mirroring.


Configuring the Mirror Server

The configuration of the mirror server is defined in a swServer.ini file located in the mirror server installation. To enable the server to run properly, the JournalFile= entry in the main server's swServer.ini file must be accurately configured as described in How to Configure a Main Server for Mirroring, and the entries in the mirror server swServer.ini file(s) must be defined using the below entries. 

  1. Open the swServer.ini in the mirror server installation in a text editor.
  2. Configure the settings in the MirrorServer section using the below entries. 
  3. Comment out the MainServer section.
  4. Save your changes. 


Tcp

Port

Required. Defines the TCP/IP port number to be used by the mirror server to connect to the main server. The port number for SystemWeaver has not been standardized. The Dynamic and/or private ports in the 49152-65535 range are allowed for use by the Internet Assigned Numbers Authority (IANA), but these may be in momentary conflict with other applications depending on the configuration of other applications on the server computer. Refer to e.g. http://www.iana.org/ for the use of port numbers.
In case there is no web server active on the SystemWeaver host computer, then the 443 port assigned to the https protocol can be used with no side effects for the SystemWeaver. In case a web browser tries to connect to the port, the request is simply ignored by the SystemWeaver server. Since the communication on 443 is assumed to be encrypted, no other network components should assume anything about the content of the communication. Note however that IANA does not approve the use of this number, likely due to the possibility of conflicts with any web server active on the host.
Port names must be unique on the host computer, and not used by any other application, including other SystemWeaver servers.
In case the access to the server from the user network will be through a proxy, the SystemWeaver client to server communication set up in SystemWeaver clients can be directed though the standard port (#8080) of the proxy. For access through firewalls and proxies, the server port 443 (https, see above) is useful since this port may offer remote access to SystemWeaver without the need to open new ports on the firewall.


IP

Defines the IP address or domain name to be used by the SystemWeaver mirror server. This entry should only be used for the case that the server uses multiple IP addresses or domain names.


CertPassword

Required if SSL Encryption is turned on (See UseSSL below). Used for authentication purposes in the SSL (Secure Socket Layer) so that the SystemWeaver clients can detect the legitimacy of the server. Enter the certificate password here. For intranet use, authentication is normally not required and SystemWeaver is therefore distributed with dummy certificates, with the dummy password "aaaa". If there is a need for specific certificates, the certificate files in the "cert" folder can be replaced by certificates generated by OpenSSL (www.openssl.org). 


AutoStart

Optional. Enables a swTestServer to start and connect to the database immediately after the server application is started. Possible values are 'true' and 'false'. The value 'true' should normally be used only after the server configuration has been verified to be fully functional. The swDBServer.exe requires 'true' since this is the only way to start the server.


UseSSL*

Optional. Defines whether SSL should be used or not. Alternatives are 'true' for SSL and 'False' for not using SSL. Within a closed network, 'false' could be used to improve robustness for network disturbances, while 'true' should be used for communications over Internet.


DLQ

Defines whether a .dlq file should be generated (True) or not (False). The default setting is False, but it is recommended that it be set to True initially, since its content allows for proper analysis should there be issues with server performance. IT administrators should be aware that a .dlq file can take some space depending on the size and activity level in the server (e.g., 10GB for very large and active systems). Once a new installation has been up and running without issue for some time, DLQ logging can be turned off.


DLQDirectory

Define the file path for the .dlq file location. If left blank, the file will generate in the same location as the server executables. Note that the system account running the server must have write permissions to the directory being written to and the directory must exist. Otherwise, the server will not start. 


MirrorServer

MainServer

The domain address of the SystemWeaver master server that the mirror server should connect to. The address may be specified as either a fixed numerical address (123.456.789.012) or a domain name (EV198).


MainServerPort

The port number of the SystemWeaver master server that the mirror server should connect to.


MainServerPassword

The password for the SystemWeaver "system" user account.


MainServerPasswordEncrypted

An alternative to the MainServerPassword entry, where the password is entered in encrypted form. The SystemWeaver utility tool EncryptString.exe may be used for generating an encrypted password for this purpose. Contact support@systemite.se to obtain the tool if desired.


Cache

The file path to the cache file and the cache file name.*


swServer.ini Example

In this example, the SystemWeaver mirror server is using port 1769 to connect to the SystemWeaver main server. The main server is running on server sys7 using port 1768.

[MainServer]
;dbType=SQLite
;DSN=D:\DB_1.sqlite
;JournalFile=D:\DB_1.swjournal
;FileRepository=D:\FileRepository
;FileRepositoryType=Files
;DatabaseUser=system
;DatabasePassword=
;DatabasePasswordEncrypted=E8Ocw4fDt8KuZcOTRg==
;CallLogging=on/detailed
;LogFileDirectory=
[Tcp]
Port=1769
IP=
CertPassword=aaaa
AutoStart=True
UseSSL=True
DLQ=False
DLQFileDirectory=
[MirrorServer]
MainServer=sys7
MainServerPort=1768
MainServerPassword=
MainServerPasswordEncrypted=E8Ocw4fDt8KuZcOTRg==
Cache=D:\DB_1_1.cache
CacheEncrypted=False



What's Next?

You are now ready to test the mirror server



* The availability of the encryption option is restricted due to EU regulations. Please contact us for more information.