English Qlik Sense June 2017

Backing up a site

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

PostgreSQL version 9.6 is installed with the latest version of Qlik Sense. If you have uninstalled Qlik Sense but maintained your PostgreSQL database, and you want to upgrade your Qlik Sense deployment, you must create a database dump file and restore the PostgreSQL database manually. You will also need to manually reconfigure any custom parameters.

Create the PostgreSQL database dump file before you uninstall Qlik Sense.

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

The following items need to be considered when backing up 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)

See: Backing up and restoring certificates

Backing up a site with shared persistence

Proceed as follows to backup a Qlik Sense site with shared persistence:

  1. Make a backup of the certificates used to secure the Qlik Sense services. This only needs to be done once.
  2. See: Backing up certificates

  3. On all nodes of the site, stop all Qlik Sense services except the Qlik Sense Repository Database (QRD).
  4. Make a backup of the repository database.
    In a shared persistence deployment with the database on a dedicated machine, this needs to be performed on the database server, using the installation location that you selected.
    1. Open a Command Prompt with administrator privileges in Microsoft Windows.

    2. Produce a dumpfile for the repository database (that is, a single file for the entire database):
      1. Navigate to the installation location.

        If your deployment includes a local database on the central node that was installed using the Qlik Sense setup program, the location will be:

        %ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin

        If your deployment includes a dedicated database server that was manually installed with the default PostgreSQL install path, the location will be:

        %ProgramFiles%\PostgreSQL\<database version>\bin

      2. pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR_backup.tar" QSR
      3. If you are prompted for the PostgreSQL super user password, enter the password that was given during the installation of Qlik Sense.

        To avoid being prompted for the password (for example, if you want to automate the Qlik Sense backup process), you can use the pgpass functionality in PostgreSQL. See the PostgreSQL documentation for more information.
    3. Make a backup of the dumpfile for the repository database.
  5. Make a backup of log and application data in the file share used for storage of log and application data.
  6. Make a backup of any locations where content that supports the Qlik Sense environment may be kept (for example, QVD files created by load scripts).
    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: 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 order is important because the QRS is dependent on the QRD and the rest of the services are dependent on the QRS.

Creating a PostgreSQL database dump file after uninstalling Qlik Sense

We recommend creating your database dump file before you uninstall Qlik Sense.

If you uninstall Qlik Sense before creating the database dump file, do the following:

  1. Copy the PostgreSQL folder from %ProgramData%\Qlik\Sense\Repository\PostgreSQL to a temporary location outside of the %ProgramData% folder.
  2. Download and install PostgreSQL version 9.6 from the PostgreSQL website. See: Manually installing a repository database in PostgreSQL.
  3. Open a Command Prompt in Microsoft Windows.
    The pg_ctl.exe command should not be run as an administrator.
  4. Navigate to the location where the PostgreSQL repository database is installed, %ProgramFiles%\PostgreSQL\<database version>\bin, and run the following commands
    1. pg_ctl.exe start -w -D "C:\SenseDB\<database version>"
    2. set PGUSER=postgres
    3. set PGPASSWORD=password
    4. pg_dumpall.exe > [<path to dump file>]
    5. pg_ctl.exe stop -w -D "C:\SenseDB\<database version>"