English Qlik Sense 3.2

Restoring a site manually

This section describes how to restore a Qlik Sense site in a default installation where a PostgreSQL database is used as the repository database.

The instructions in this section are only applicable to the central node of a Qlik Sense site.

See: Backing up and restoring a site

The procedure described in this section can also be performed using the Repository Snapshot Manager (RSM).

See: Using the Repository Snapshot Manager

Items to restore

The following items need to be considered when restoring a site:

  • Repository database: The database contains all configuration data for the site.
  • 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 site with shared persistence

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

Proceed as follows to restore a Qlik Sense site:

  1. Install the Qlik Sense software on the machine targeted for the restore.
  2. See: Installing and upgrading Qlik Sense

    Make sure to deselect Start the Qlik Sense services when the installation has completed during the installation setup. If the services are started, new certificates and a new repository database are created and they must be removed before proceeding with the restore procedure.
  3. Restore the certificates used to secure the Qlik Sense services.
  4. See: Restoring certificates

    Do not start the Qlik Sense services at the end of the Restoring certificates procedure.
  5. Start the Qlik Sense Repository Database (QRD).
  6. Restore the repository database:
    1. Place the backed up repository database on the machine targeted for the restore.
    2. Open a Command Prompt with administrator privileges in Microsoft Windows.

    3. Run the following commands to restore the repository database (adjust the paths as needed):
      1. cd "%ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin"

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

      3. If the command fails because a database already exists, run the following command and then repeat the createdb command:

        dropdb -h localhost -p 4432 -U postgres QSR

      4. pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\QSR_backup.tar"

  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 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.

      See: Qlik Sense Repository Service

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

    The order is important because the QRS is dependent on the QRD and the rest of the services are dependent on the QRS.

Restoring a site with synchronized persistence

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

Proceed as follows to restore a Qlik Sense site:

  1. Install the Qlik Sense software on the machine targeted for the restore.
  2. See: Installing and upgrading Qlik Sense

    Make sure to deselect Start the Qlik Sense services when the installation has completed during the installation setup. If the services are started, new certificates and a new repository database are created and they must be removed before proceeding with the restore procedure.
  3. Restore the certificates used to secure the Qlik Sense services.
  4. See: Restoring certificates

    Do not start the Qlik Sense services at the end of the Restoring certificates procedure.
  5. Start the Qlik Sense Repository Database (QRD).
  6. Restore the repository database:
    1. Place the backed up repository database on the machine targeted for the restore.
    2. Open a Command Prompt with administrator privileges in Microsoft Windows.

    3. Run the following commands to restore the repository database (adjust the paths as needed):
      1. cd "%ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin"

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

      3. If the command fails because a database already exists, run the following command and then repeat the createdb command:

        dropdb -h localhost -p 4432 -U postgres QSR

      4. pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\QSR_backup.tar"

  7. Restore log and application data to these folders:

    • %ProgramData%\Qlik\Sense\Log
    • %ProgramData%\Qlik\Sense\Apps
    • %ProgramData%\Qlik\Sense\Repository\Content
    • %ProgramData%\Qlik\Sense\Repository\Extensions
    • %ProgramData%\Qlik\Sense\Repository\AppContent (if available)
  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 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.

      See: Qlik Sense Repository Service

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

    The order is important because the QRS is dependent on the QRD and the rest of the services are dependent on the QRS.

  10. If you are restoring a multi-node site, you have two options:
    • If a rim node does not contain any data that needs to be kept, remove and then re-add the rim node as if it was an entirely new node. This means that the content on the rim node will be the same as the content on the central node when it was restored.

    • Do the following:

      1. In the Qlik Management Console (QMC) on the central node, delete the rim node.
      2. On the rim node, uninstall Qlik Sense with the Remove Qlik Sense certificates and data folders option selected.
      3. On the rim node, install Qlik Sense again.
      4. In the QMC on the central node, add the newly installed rim node to the site using the normal procedure.
      5. See: Configuring the node

    • If a rim node contains data that was added after the backup, and is required to be kept, then the synchronization process needs to be notified to resend the missing data from the rim node to the restored central node. This also means that any data that was deleted on the rim node will be deleted on the restored site after synchronization.

    • On the rim node, connect to the QRS API and call the POST /qrs/sync/snapshot/restore endpoint without any parameters or body. This endpoint instructs the Qlik Sense Repository Service (QRS) to push data back to the central node.

Restoring a central node to a machine with a different hostname

A restore can occur onto a machine with a different name than the one from which the data was backed up. However, if the machine is a central node in a multi-node site, you need to adapt the procedure.

  • All rim nodes need to be reset, that is, you need to remove them and then add them again.
  • Before starting the database, you need to update the hostname in the repository by executing the following command in PostgreSQL:

    UPDATE "LocalConfigs"
    SET "HostName" = '@newHostName'
    WHERE "HostName" = '@oldHostName';

    replacing @newHostName and @oldHostName with the actual new and old hostnames.

  • Do not import certificates from the old system, as they will be invalid on the new node. You need to authorize certificates on the new node.

    You also need to update password information for all data connectors, as the passwords were encrypted using the certificate on the old system.

Known issues

If Qlik Sense stops responding or does not respond properly after the restore operation, try restarting the Qlik Sense Repository Service (QRS) and then wait for the rest of the services to start up.

See also: