HOWTO

Replicate SwyxServer user database and folders (kb2519)

The information in this article applies to:

  • SwyxWare v5.00
  • SwyxWare v4.40
  • SwyxWare v4.33
  • SwyxWare v4.32
  • SwyxWare v4.14
  • SwyxWare v4.20

[ Summary | Information | Links ]


Summary

This article describes how to replicate the SwyxWare user database and SwyxWare data/user folders between a master SwyxServer and a fallback SwyxServer

Information

This article describes a configuration of two SwyxServer where one acts as the main (master) SwyxServer and the other a fallback server to be used when the main server fails. Note that a complete fallback scenario is beyond the scope of this article. It concentrates on replication of the SwyxServer user database and data/user folders.

Replicate SwyxWare user database

To replicate a SwyxWare (>= v4.40) user database use the IpPbxRepl.wsf windows script file from the kb2519_IpPbxDBRepl.zip file (see references below).

To replicate a SwyxWare (< v4.40) user database use the IpPbxRepl.wsf windows script file from the kb2519_IpPbxDBRepl_Before_V4 40.zip file (see references below).

It has to be run on the master SwyxServer and does the following:

  1. Creates a backup of the master server's database.
  2. Copies the backup file to the fallback server.
  3. If SwyxServer service is not running on the fallback server, the database is restored from the copied backup file. After that the script corrects file path and login information in the database to match the fallback server.

To get a periodic replication create a scheduled task on the master server which runs the script. To successfully run the script the following requirements have to be met:

  • Master and fallback SwyxServer must use the same MSDE/SQLServer version. MSDE 2000 or SQLServer 2000 recommended.
  • MSDE/SQLServer should be installed to the same location on both systems. If not, use option -d when calling this script (see below).
  • Master and fallback SwyxServer must use the same SwyxWare version. The SwyxWare Database must exists on the fallback Server. The script overwrites these database with the version from the master server.
  • Master server must have Windows Script Host 5.6 installed. Programs, like virus scanner, should not block the execution of scripts.
  • The fallback server's MSDE/SQLServer must be accessible from the master server. It might be necessary to change the MSDE communication settings to allow this. Use the svrnetcn.exe program located in the MSDE tools\binn folder to ensure that TCP/IP is enabled.
  • The account which runs the replication script has to have administrative rights on both machines.
  • The account which runs the replication script has to be able to perform the following tasks:
    1. On the master server's MSDE/SQLServer:
      Create backups
    2. On the fallback server's MSDE/SQLServer:
      Restore backups
      Manage database users and roles
  • The fallback server must have a file share where the user account which runs this script has read and write access to (Used to copy the backup file onto the fallback server)
  • SwyxWare services on both the master and fallback system must use the same domain service account!
  • Because the database is replicated, the gateway names must be the same for the master and fallback server.

Example

The database on main SwyxServer named "swyxsrv-master" will be replicated to fallback SwyxServer "swyxsrv-fallback".

At first create a share named "repl" on swyxsrv-fallback where the database backup files from swyxsrv-master will be copied to. Set the access permissions on the share and folder to allow swyxsrv-fallbacks's SwyxWare Administrators local group and the account which runs the replication script read and write access.

Next create a folder named "swyxsrv-backups" on swyxsrv-master where the database backup files will be stored

Start the replication script with the following command line cscript.exe IpPbxDBRepl.wsf /b:"swyxsrv-fallback" /t:"c:\swyxsrv-backups" /r:"\\swyxsrv-fallback\repl"

Hint: Try calling the script manually first. When everything works as expected, create the scheduled task.

SwyxWare Folder ReplicationTo replicate the master server's SwyxWare data and user folders use the Windows 2000 Distributed File System (DFS) service or another third-party tool. To configure DFS you have to:

  • Create a DFS root which holds the DFS link to the replicated folders.
  • Create a DFS link below the DFS root which has two target folder. The first one is the master server's SwyxWare share, e.g. \\swyxsrv-master\swyxWare. The second one is the fallback server's SwyxWare share, e.g. \\swyxsrv-fallback\SwyxWare.
  • Configure replication by setting the master server's folder as the replication master. The file replication service automatically starts replication of the master server's folder to the fallback server and keeps both folder trees in sync.

For further information about Windows 2000 DFS refer to the Windows 2000 Server documentation.


Links

As far as software supplied or used by us, includes open source elements the additional terms under https://www.swyx.com/open-source apply in addition. An overview which products from the Swyx portfolio include open source elements and which open source license is relevant can be found under https://www.swyx.com/open-source.

The third-party contact information included in this article is provided to help you find the technical support you need. This contact information is subject to change without notice. Swyx in no way guarantees the accuracy of this third-party contact information nor is responsible for it's content.


Comment

Comment on this article



If we have any follow-up questions, where can we contact you?

E-Mail Address (optional)


Note

This feedback form can't be used for support requests. Those requests must be directed to your Swyx reseller or distributor.