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.
- A main server is installed and configured for mirroring
- The version of the main server and the mirror server match
- The machine that will host the mirror server meets the server requirements described in SystemWeaver Server - Software and Hardware Requirements
- An installation of the swDatabaseManager tool that is compatible with the SystemWeaver server and database
Installing the Mirror Server Application
As mentioned above, the mirror server installation is the same as the main server installation.
- Navigate to your delivery of SystemWeaver.
- Take a copy of the Server directory for the mirror server installation.
Example SystemWeaver Delivery
- On the server machine(s) designated as the mirror server(s), create a directory called, e.g., MirrorServer.
- 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.
- Open the swServer.ini in the mirror server installation in a text editor.
- Configure the settings in the MirrorServer section using the below entries.
- Comment out the MainServer section.
- Save your changes.
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.|
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).
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.
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.
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).
The port number of the SystemWeaver main server that the mirror server should connect to.
The password for the SystemWeaver "system" user account.
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 firstname.lastname@example.org to obtain the tool if desired.
The file path to the cache file and the cache file name.*
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.
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 CacheInMemory=False
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.|
You are now ready to test the mirror server.