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 License Backend Server after applying license key - Signed License Key)
- 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.
Do the following:
- Stop all Qlik Sense services except the Qlik Sense Repository Database (QRD), on every node in your deployment.
- Make a backup of the repository database by creating a database dump file:
- Open a Command Prompt in Microsoft Windows.
- 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. - 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. - Make a backup of all of the content in the file share.
- 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).
- Restart the Qlik Sense services.
Backing up the Qlik Sense Repository Database after uninstalling Qlik Sense
If you uninstall Qlik Sense before creating the database dump file, do the following:
- Copy the PostgreSQL folder from %ProgramData%\Qlik\Sense\Repository\PostgreSQL to a temporary location outside of the %ProgramData% folder.
- Download and install PostgreSQL version 12.x from the PostgreSQL website. See: Installing and configuring PostgreSQL.
-
Open a Command Prompt in Microsoft Windows.
Information noteThe pg_ctl.exe command should not be run as an administrator.
-
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. - Run the following commands:
- pg_ctl.exe start -w -D "C:\SenseDB\12.x"
- set PGUSER=postgres
- set PGPASSWORD=password
- pg_dumpall.exe > [<path to dump file>]
- 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.