Backing up a Qlik Sense site
Backing up a Qlik Sense site includes backing up the following:
- Repository database: The database contains all configuration data for the site
- Log data: The centralized logging database
- 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.
Note: 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.Note: If you installed PostgreSQL manually, the location will be:
- Run the following command:
pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR_backup.tar" QSR
If you are prompted for the PostgreSQL super user password, enter the password that was created during the Qlik Sense setup.Tip: 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.
- Make a backup of all of the content in the file share.
- If you have centralized logging configured, make a backup of the centralized logging database by running the following command:
pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QLogs_backup.tar" QLogs
- 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 9.6 from the PostgreSQL website. See: Installing and configuring PostgreSQL.
Open a Command Prompt in Microsoft Windows.
Note: The pg_ctl.exe command should not be run as an administrator.
Navigate to the location where the PostgreSQL repository database is installed.
- Run the following commands:
- pg_ctl.exe start -w -D "C:\SenseDB\9.6"
- set PGUSER=postgres
- set PGPASSWORD=password
- pg_dumpall.exe > [<path to dump file>]
- pg_ctl.exe stop -w -D "C:\SenseDB\9.6"