Friday, 23 May 2025

STEP by STEP : Qlik Sense Server Migration by Cloning with Hostname Change

STEP by STEP : Qlik Sense Server Migration by Cloning  with Hostname Change

Step 1: Prepare and Backup the Source Server

1.1 Stop All Qlik Services

Open Services.msc and stop these in order:

  • Qlik Sense Engine Service

  • Qlik Sense Proxy Service

  • Qlik Sense Repository Service

  • Qlik Sense Scheduler Service

  • Qlik Sense Service Dispatcher

1.2 Backup the Following Folders

Manually copy these folders to a safe location:

makefile

C:\ProgramData\Qlik\Sense\Repository\ C:\ProgramData\Qlik\Sense\Apps\ C:\ProgramData\Qlik\Sense\Certificates\ C:\Program Files\Qlik\

1.3 Backup PostgreSQL Databases

Use pg_dump or Qlik Shared Persistence tools:

bash
pg_dump -U postgres -F c -b -v -f "QSR.backup" QSR pg_dump -U postgres -F c -b -v -f "SenseServices.backup" SenseServices

Step 2: Clone the Server and Change Hostname

2.1 Clone the Source Server

Use your hypervisor or disk cloning tool to replicate the VM (e.g., VMware, Hyper-V, Veeam).

2.2 Power On and Rename New Server

  1. Boot the new server on isolated or test network.

  2. Change hostname:

    • System Properties > Computer Name > Change

    • Reboot after change

2.3 Ensure Old Server is Offline (to avoid hostname conflicts)


Step 3: Update Qlik Sense Configuration on New Server

  • Log in as the service account.
  • Stop all the Qlik Sense services, except for the Qlik Sense Repository Database.
  • Use Microsoft Management Console(MMC) to backup and then delete all the Qlik Sense related certificates (client, server, trusted root). (From Personal and Local User)
  • Delete or rename the folder %ProgramData%\Qlik\Sense\Repository\Exported Certificates\.Local Certificates.
  • Make a copy of %ProgramData%\Qlik\Sense\Host.cfg and rename the copy to Host.cfg.old. Host.cfg contains the hostname encoded in base64. You can generate this string for the new hostname using a site such as base64encode or by running the following PowerShell scriptlet:[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("yourServerHostname.yourDomain.com"))
  • Open Host.cfg and replace the content with the new string.



Step 4: Bootstrap the Repository to Register New Hostname

4.1 Run Bootstrap Command

In Administrator PowerShell:

powershell

"C:\Program Files\Qlik\Sense\Repository\Repository.exe" -bootstrap -restorehostname
-standalone

 This:

  • Rebinds the repository to the new hostname

  • Re-registers the node in the Qlik Repository Database (QSR)

  • Uses the value in host.cfg

Wait for successful completion. Check logs:

C:\ProgramData\Qlik\Sense\Log\Repository\Trace\ Start all the Qlik Sense services in the proper order. If the script doesn't get to "Bootstrap mode has terminated. Press ENTER to exit.." and
gets stuck at " Entering main startup phase.." start the "Qlik Sense dispatcher service"
and it will get to the end)


Repository Database consideration: The relevant tables in the repository database that contain the host name information are: LocalConfigs ( Hostname column ) ServerNodeConfigurations ( Host Name ) Note: Please make sure that the above table hostname column should contain the correct server FQDN
( network host name and not the individual machine host name ) this should be exactly the hostname
that is in the host.config file Note : LocalConfigs table has been removed in Qlik Sense Enterprise February 2019 and newer.

Step 5: Apply Qlik Sense License

5.1 Access QMC on New Hostname

  • Open: https://NewServerName/qmc

  • Navigate to: License Management

  • Apply your license:

    • LEF (old model) or

    • Signed License Key (SLK)

Note: If the license is already in use by the old server, you may need to deactivate it via Qlik support or license portal.


Step 6: Validate All Services

  1. Ensure all services are running:

    • Use QMC > Service Cluster or services.msc

  2. Validate:

    • QRS (Repository)

    • QES (Engine)

    • QPS (Proxy)

    • QSS (Scheduler)

  3. Check system logs under:

    C:\ProgramData\Qlik\Sense\Log\

Step 7: Update Environment Configurations

7.1 Update Data Connections

  • QMC > Data Connections

  • Edit any UNC paths or host-based links

 7.2 Update UDC (User Directory Connector)

  • QMC > User Directory Connectors

  • Update any host references

7.3 Review and Fix Hardcoded Hostnames

  • App Load Scripts

  • QlikView-style scripts using lib:// or full paths

Use the QlikSenseUtil at C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\QlikSenseUtil.exe to inject in the new share path. 
Note: Use alternative installation path if Qlik Sense is not installed to C:\Program Files
  • First, connect to the database under the Connect to database tab.  
  • For Host Name type the new Central node FQDN. 
  • Use the default postgres Database user and the password created during the Qlik Sense installation.
  • In the Service cluster tab, click OK to retrieve the current Share paths. 
  • Change them to include the new hostname and click Save.
  • Click Clear and then OK once more to confirm the new paths have been saved to the database.

Step 8: Validate Platform

Basic Checks

  • Hub access: https://NewServerName/hub

  • QMC access

  • Reload test apps

  • Access sheets and streams

  • Check for certificate warnings in browser

No comments:

Post a Comment

STEP by STEP : Qlik Sense Server Migration by Cloning with Hostname Change

STEP by STEP : Qlik Sense Server Migration by Cloning  with Hostname Change Step 1: Prepare and Backup the Source Server 1.1 Stop All Qlik ...