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 .cache file does not need to be on the same drive as the server application just as long as they are located on the same machine. Our only recommendation is to place the .cache on the fastest disk.


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. 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.


Note: The port # used by the mirror can be the same as the port # used by the main. As long as the main and mirror servers are located on different server machines. 


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 Encryption is turned on (See UseSSL below). Used for authentication purposes so that the SystemWeaver clients can detect the legitimacy of the server. To use encryption you must have a certificate. Many organizations already have a process for this and guidelines as to what type of certificate to use. The certificate needs to be in the .pfx format and must be called CARoot.pfx. It must be placed in the Server installation directory.  Enter the certificate password here. For intranet use, authentication is normally not required and SystemWeaver is therefore distributed with a dummy certificate. 


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 encryption should be used or not. Alternatives are 'true' for encryption turned on, and 'False' for not. 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 main 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 main 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.* 


CacheInMemory

An option to run a mirror server without having a local cache file. Only suitable for databases smaller than 1 GB, or in a QA environment where you have less requirements on the server uptime.  We always recommend running the mirror with a local cache.


swServer.ini Example

In this example, the SystemWeaver mirror server is using port 2222 to connect to the SystemWeaver main server. 

The main server is running on server machine sys7 using port 1111.

The mirror is using a cache file. 


Logging

Although initial DLQ logging is configured in the swServer.ini as described above, standard server logging is done using .prop and .nlog files. See How to Configure and Start Logging to set up the swServer logging and How to Configure Logging for the TcPSubServer to set up the TcpSubServer logging for the mirror server. INFO logging should have no impact on performance.


Important: Make sure that there is sufficient disk space. Old log files, i.e., that are not being written to, can be deleted.

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.