Skip to main content

Backing up a Qlik Sense site

Backing up a Qlik Sense site includes backing up the following:

  • 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)
  • Log data: Local log files
  • The file share: The shared folder in that contains application data, such as data models used in the Qlik Sense apps, and QVD files

To restore your Qlik Sense deployment you will also need a back up of your Qlik Sense certificates. For more information, see Backing up certificates.

You must perform this backup procedure on each of the nodes that host the components listed above.

Information noteRim nodes maintain local log files that may be worth backing up in order to identify and investigate issues. It may also be worth backing up any general operating system data that may be required.
  1. Stop all Qlik Sense services except the Qlik Sense Repository Database (QRD), on every node in your deployment.
  2. Make a backup of the repository database by creating a database dump file:
    1. Open a Command Prompt in Microsoft Windows.
    2. Navigate to the location where the PostgreSQL repository database is installed.
      Information noteIf 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.
      Information note If you installed PostgreSQL manually, the location will be:
      %ProgramFiles%\PostgreSQL\<database version>\bin.
    3. Run the following commands:

      pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR_backup.tar" QSR

      pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\SenseServices_backup.tar" SenseServices

      pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSMQ_backup.tar" QSMQ

      pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\Licenses_backup.tar" Licenses

      If you are prompted for the PostgreSQL super user password, enter the password that was created during the Qlik Sense setup.

      Tip noteTo 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 all of the content in the file share.
  4. 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).
  5. Restart the Qlik Sense services.

Backing up the Qlik Sense Repository Database after uninstalling Qlik Sense

Warning noteWe 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 12.x from the PostgreSQL website. See: Installing and configuring PostgreSQL.
  3. Open a Command Prompt in Microsoft Windows.
    Information noteThe pg_ctl.exe command should not be run as an administrator.
  4. Navigate to the location where the PostgreSQL repository database is installed.
    Information noteIf 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.
    Information note If you installed PostgreSQL manually, the location will be:
    %ProgramFiles%\PostgreSQL\<database version>\bin.
  5. Run the following commands:
    1. pg_ctl.exe start -w -D "C:\SenseDB\12.x"
    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\12.x"

    If you are prompted for the PostgreSQL super user password, enter the password that was created during the Qlik Sense setup.

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