Skip to main content Skip to complementary content

Restoring a Qlik Sense site

Consider the following when restoring a site:

  • Qlik Sense software
  • Repository database (QSR): The database contains all configuration data for the site.
  • SenseServices database (if you have a linked cloud environment)

  • QSMQ database (if you have a linked cloud environment)

  • Licenses (optional, license assignments restored from LBS after applying license key - SGK)

  • Certificates for the Qlik Sense services: The certificates are used to encrypt the traffic between the services and the users. Make sure to backup the certificates in order not to lose any encrypted data (for example, passwords for data connections).
  • Log data
  • Application data: The data models in the Qlik Sense apps.
  • Any content that supports the apps (for example, QVD files)

Restoring a Qlik Sense site to a machine with the same hostname

When performing the procedure below you must log in using an account that had the Root Admin role when the site was backed up. If you log in using a local admin account and the machine name is different, your permissions will not follow through.

  1. Restore the certificates used to secure the Qlik Sense services.
  2. Restoring certificates

  3. Install Qlik Sense on the computer where you plan to restore.
  4. Warning noteMake sure to deselect Start the Qlik Sense services when the installation has completed during the installation setup.
  5. Start the Qlik Sense Repository Database (QRD).
  6. Restore the repository database:
    1. Open a Command Prompt with administrator privileges in Microsoft Windows.

    2. Navigate to: cd "%ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin"

    3. Run the following command to restore the repository database on a clean server:

      pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\QSR_backup.tar"
      pg_restore.exe -h localhost -p 4432 -U postgres -d SenseServices "c:\SenseServices_backup.tar"
      pg_restore.exe -h localhost -p 4432 -U postgres -d QSMQ "c:\QSMQ_backup.tar"
      pg_restore.exe -h localhost -p 4432 -U postgres -d Licenses "c:\Licenses_backup.tar"

    Information noteYou may need to adjust the path "c:\QSR_backup.tar" depending on where you backed up your database dump file.

    If running these commands on a server where a repository database may have been installed previously, you may get the following error messages. Note the name of affected database and adjust corrective commands accordingly. For example, for the "QSR" database you might get:

    • pg_restore: [archiver (db)] connection to database "QSR" failed: FATAL: database "QSR" does not exist

      If you get this error, from the same location run following command:

      createdb -h localhost -p 4432 -U postgres -T template0 QSR

      Then run the restore command again.

    • pg_restore: [archiver (db)] Error while PROCESSING TOC

      pg_restore: [archiver (db)] Error from TOC entry 185; 1259 134513 TABLE Apps qliksenserepository

      pg_restore: [archiver (db)] could not execute query: ERROR: relation "Apps" already exists

      If you get many errors like above, stop the restoration process and from the same location run following two commands, one after another:

      dropdb -h localhost -p 4432 -U postgres QSR

      createdb -h localhost -p 4432 -U postgres -T template0 QSR

      Then run the restore command again.

    Information noteFor the SenseServices, QSMQ, and Licenses databases, the default owner is qliksenserepository instead of postgres. Use the following modified command for these databases, adjusting the database name accordingly: createdb -h localhost -p 4432 -U postgres -O qliksenserepository -T template0 SenseServices
  7. Restore log and application data to the file share used for storage of log and application data.

  8. Restore any supporting content to its original location as required.
  9. Start the Qlik Sense services. If the services are started manually, start them in the following order:

    1. Qlik Sense Service Dispatcher (QSD)
    2. Qlik Sense Repository Service (QRS)

      If the user running Qlik Sense services is not local administrator on the machine, you need to start Repository.exe from an elevated command prompt using the -bootstrap parameter.

      Services

    3. Qlik Sense Proxy Service (QPS), Qlik Sense Engine Service (QES), Qlik Sense Scheduler Service (QSS), and Qlik Sense Printing Service (QPR) in no specific order

    The start-up order is important. During start-up the QRS must be able to contact the Qlik License Service, which is managed by the QSD. The other services are dependent on the QRS. The QSD must therefore be running when the QRS is started.

  10. Try to access the QMC or the Hub to verify that the migration has been successful. Also, from the Qlik Management Console reload the monitoring apps to verify that your certificates have been installed correctly.

    Information noteIf restoring a multi-node site with central node on a machine with a different hostname, all rim nodes must be reset, that is, you need to remove them and then add them again.

Restoring a Qlik Sense site to a machine with a different hostname

You can restore a Qlik Sense site to a machine with a host name that is different from the site that you backed up.

Perform the following steps on the target server machine, where you want to restore Qlik Sense.

  1. Restore the certificates used to secure the Qlik Sense services.
  2. Restoring certificates

  3. Install Qlik Sense on the computer where you plan to restore.
  4. Warning noteMake sure to deselect Start the Qlik Sense services when the installation has completed during the installation setup.
  5. Start the Qlik Sense Repository Database (QRD).
  6. Restore the repository database:
    1. Open a Command Prompt with administrator privileges in Microsoft Windows.

    2. Navigate to: cd "%ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin"

    3. Run the following command to restore the repository database on a clean server:

      pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\QSR_backup.tar"
      pg_restore.exe -h localhost -p 4432 -U postgres -d SenseServices "c:\SenseServices_backup.tar"
      pg_restore.exe -h localhost -p 4432 -U postgres -d QSMQ "c:\QSMQ_backup.tar"
      pg_restore.exe -h localhost -p 4432 -U postgres -d Licenses "c:\Licenses_backup.tar"

    Information noteYou may need to adjust the path "c:\QSR_backup.tar" depending on where you backed up your database dump file.

    If running these commands on a server where a repository database may have been installed previously, you may get the following error messages. Note the name of affected database and adjust corrective commands accordingly. For example, for the "QSR" database you might get:

    • pg_restore: [archiver (db)] connection to database "QSR" failed: FATAL: database "QSR" does not exist

      If you get this error, from the same location run following command:

      createdb -h localhost -p 4432 -U postgres -T template0 QSR

      Then run the restore command again.

    • pg_restore: [archiver (db)] Error while PROCESSING TOC

      pg_restore: [archiver (db)] Error from TOC entry 185; 1259 134513 TABLE Apps qliksenserepository

      pg_restore: [archiver (db)] could not execute query: ERROR: relation "Apps" already exists

      If you get many errors like above, stop the restoration process and from the same location run following two commands, one after another:

      dropdb -h localhost -p 4432 -U postgres QSR

      createdb -h localhost -p 4432 -U postgres -T template0 QSR

      Then run the restore command again.

  7. Restore log and application data to the file share used for storage of log and application data.

  8. Restore any supporting content to its original location as required.
  9. To launch Qlik Sense with the new hostname:

    1. Open a Command Prompt with administrator privileges in Microsoft Windows.

    2. Change the directory to the Repository installation path

      Default path: "C:\Program Files\Qlik\Sense\Repository"

    3. Execute the following command:

      Repository.exe -bootstrap -standalone -restorehostname

      Information noteThe parameter '-standalone' means that Repository runs as a normal executable process (as opposed to running as a service, and registering in Windows Service Manager).
    4. Start the Qlik Sense Service Dispatcher when the following message is displayed. If the Qlik Sense Service Dispatcher is not running, the hostname update will not complete.

      [INFO] Entering main startup phase...

      When the command has completed successfully check for errors in the logs and the following message is displayed:

      Bootstrap mode has terminated. Press ENTER to exit..

  10. Start the Qlik Sense services. If the services are started manually, start them in the following order:

    1. Qlik Sense Repository Service (QRS)

      If the user running Qlik Sense services is not local administrator on the machine, you need to start Repository.exe from an elevated command prompt using the -bootstrap parameter.

      Services

    2. Qlik Sense Proxy Service (QPS), Qlik Sense Engine Service (QES), Qlik Sense Scheduler Service (QSS), and Qlik Sense Printing Service (QPR) in no specific order

    The start-up order is important. During start-up the QRS must be able to contact the Qlik License Service, which is managed by the QSD. The other services are dependent on the QRS. The QSD must therefore be running when the QRS is started.

  11. Try to access the QMC or the Hub to verify that the migration has been successful. Also, from the Qlik Management Console reload the monitoring apps to verify that your certificates have been installed correctly.

    Information noteIf restoring a multi-node site with central node on a machine with a different hostname, all rim nodes must be reset, that is, you need to remove them and then add them again.

For additional information on changing the hostname after installation, see Qlik Sense: Change hostname (and certificates) after an installation.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!