CML - Recovery procedure for master node

This section describes how to recover master node (1st installed node) of the CML cluster. The same procedure can be used for the installation with the single CML node - the only difference is that both databases shall be taken from the regular database backup.

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg If the master node is not operational for a longer period of time, you can use the procedure from CML - Printer settings in case of one CML node failure to sustain the printing functionality.

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg The procedure does not require shutdown of the running CML nodes in the cluster.

 

Warning

If you are going to recover the YSoft SafeQ on a new PC (meaning on a new installation of operating system or on a different server), you must request the license reactivation on a new hardware. For more information see chapter Transferring license to new system (hardware or operating system change).


This article consists of:

Requirements

Kindly prepare all the required data before starting with the master node (1st installed node) recovery:

  1. SQDB5 database backup from the regular system backup

    • images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg Cluster environment: skip this point as the database backup will be obtained from another member of the CML cluster later in the procedure.

  2. SQDB5_SQDW database backup from the the master node (1st installed node)

    • images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/warning.svg Cluster environment: The backup must be 7 days old at the most. If the backup is older than 7 days, the statistical data between the last backup date and 7 days back from the current moment will be missing.

  3. Configuration files backup from the 1st installed node, eventually master CML GUID

  4. TEMP and SPOOL folder backup from the 1st installed node if they are available

    • required only in case that cluster-readSharedFolderJob is disabled

    • required only in case that you wish to restore the print jobs that were stored on this server

  5. Folder containing scripts for scanning (in case that scan to script is used)

Step 1 - restore hardware after server failure (optional)

Restore hardware required for YSoft SafeQ server.

Step 2 - restore software after server failure

1

Install one of the supported operating systems for YSoft SafeQ server

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/warning.svg Make sure that server has the same IP address and hostname settings as before the failure.


2

Install one of the supported databases (or select the embedded database during installation of YSoft SafeQ in the next step)

  • Database type MUST be the same as before the failure.

  • YSoft SafeQ database backup from master node is a MUST for the restoration of the master node.

Step 3 - prepare the environment


1

Perform this step on all running CML servers

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg  Skip this step in case there exists just one CML node in the environment (non-clustered installation)


Verify synchronization

Check that all data are synchronized between all running YSoft SafeQ nodes.

  • go to System => System information => Services column

  • all values in Database pool priority column must have value 0

    Note: Database pool priority on the original master node will probably be non zero (as it is not running and cannot be synchronized).

    images/download/attachments/21955755/041.png





2

Perform this step on all CML servers that remained functional (did not crash)

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg  Skip this step in case there exists just one CML node in the environment (non-clustered installation)


Using the program pgAdmin III or MS SQL management studio connect to the SQDB5 database:

  • Connect using the first database account (not Sync).

  • Enter the password you have selected during CML installation when asked for it.

2a.  Find out the master node db_flag using the following query:

  • select db_flag from cluster_server where id = (select min(id) from cluster_server)
     

2b. Run the following queries. Replace x by the proper db_flag for the master node (obtained in the previous step) before running them :

  • delete from cluster_sync_update_10 where server_flag & x = x;

  • delete from cluster_sync_update_20 where server_flag & x = x;

  • delete from cluster_sync_update_30 where server_flag & x = x;

 

3

Perform the database backup of SQDB5 database on CML2 (the second node of the cluster).
images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg In case that you have just 1CML node in your environment, skip this step as you will use the database backup created by regular daily backup.

 

Step 4 - install and configure the new server


1

Perform following step on the node which you are recovering:


1a. Perform the installation

Install YSoft SafeQ in the new location according to Installing YSoft SafeQ CML instructions.

Installation requirements:

  • Install only one CML server node (Do not connect it in to existing cluster!)

  • Use the same database type as for other nodes that are installed already

  • Untick the "Start SafeQ services after the installation is finished" option


1b. Restore databases

Restore databases according to CML - Database restore instructions with following exceptions:

  • Restore SQDB5 from the backup made on CML2 in the previous steps (in case of standalone CML installation use the backup created by regular daily backup)

  • Restore SQDB5_SQDW from the backup created by regular daily backup of the original master node (1st installed node)

  • Do not start YSoft SafeQ services at the end of the restoration procedure but continue with the next step of this guide

1c. Run these queries at master node on SQDB5

  • delete from cluster_sync_update_10;

  • delete from cluster_sync_update_20;

  • delete from cluster_sync_update_30;


1d. Modify the database

Using the program pgAdmin III or MS SQL management studio connect to the SQDB5 database:

  • Enter the password you have selected during CML installation (for database user, do not use the account Sync).

  • Open cluster_server table and change localhostvalue as follows:

    • localhost = 1 for the first row (row that contains name and IP address of the server you are restoring)

    • localhost = 0 for all others rows

      images/download/attachments/21955755/localhost.png














1e. Using pgAdmin III or MS SQL management studio run following query:

  • delete from smartq_validator


1f. Replace the configuration files

Overwrite existing configuration files with original configuration backup:

  • <SAFEQ_DIR>\conf

  • <SAFEQ_DIR>\terminalserver\TerminalServer.exe.config

  • <SAFEQ_DIR>\tomcat\conf

  • Delete or rename <SAFEQ_DIR>\conf\update.conf file (it would block the start of YSoft SafeQ CML service)

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/warning.svg WARNING: This step requires the password for database/sync users in the database is the same as it was before the failure. Skip this step and configure server manually if you do not have exactly the same configuration as before the server failure! However (if you have ORS connected) keep in mind:

  • localGUID in startup.conf must be configured the same way as before the failure


1g. Restore spooled jobs

Restore your backup of temp and spool directory

  • Copy spool directory from original YSoft SafeQ server to <SAFEQ_DIR>\server\spool

  • Copy temp directory from original YSoft SafeQ server to <SAFEQ_DIR>\server\temp

  • Copy folder containing scripts for scanning (if scan to script is used) to the same location as it was on the original server

1h. Start services on Master node:

Open Services (e.g. Start => Run => services.msc) and start all YSoft SafeQ services in any order:

  • YSoft SafeQ CML

  • YSoft SafeQ CML DBS

  • YSoft SafeQ Terminal Server

  • YSoft SafeQ LDAP Replicator Service

  • YSoft SafeQ Web Interface

Step 5 - verification of the functionality

1

Log in to the web interface (YSoft SafeQ Web interface => System => System information) of the master node.

  • Verify that all servers are showing status ONLINE (the node you are connected to may show status LOCAL)

  • Verify that synchronization between the nodes in the cluster is functional. See table DBsync database & system pools (non-local servers only). Values in column Database pool priority must not be growing constantly. They shall be changing and they shall be often around 0.

images/download/attachments/21955755/systeminfo.png

2

Test authentication/print/copy/scan. All functions must be working. Also accounting must return the correct data.

 

3

In case of non-clustered environment (1CML only), cache on every ORS has to be deleted. For specific instructions see article ORS - How to delete corrupted cache.