During Qlik Sense upgrading especially when upgrading from synchronization persistence to shared persistence, backup PostgreSQL database is a very important step. What are the right steps to do database backup if Qlik Sense has been uninstalled?
See Qlik Hep site for latest referenced information under Upgrading to Qlik Sense June 2017 or later after uninstalling Qlik Sense 3.1 SR2 or later Environment:
- Qlik Sense Enterprise, all versions
Qlik Sense Enterprise was uninstalled prior to upgrading.
Creating a PostgreSQL database dump file after uninstalling Qlik Sense
We recommend creating your database dump file before uninstalling Qlik Sense.Note1:
Cross reference Qlik Hep site's documentation for latest referenced information for the corresponding version of Qlik Sense under Upgrading to Qlik Sense June 2017 or later after uninstalling Qlik Sense 3.1 SR2 or later
See June 2017 reference under Manually installing a repository database in PostgreSQL
In older versions of Qlik Sense, this backup only can be done if the option "Remove Qlik Sense certificates and data folders" is not checked when uninstalling Qlik Sense. The reasoning is that this option instruct the uninstallation process to keep the PostgreSQL database but just uninstall Qlik Sense software. Newer versions may indicate the option to keep the database explicitly while uninstalling.
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.
- Open a Command Prompt in Microsoft Windows.
The pg_ctl.exe command should not be run as an administrator.
- Navigate to the location where the PostgreSQL repository database is installed, %ProgramFiles%\PostgreSQL\<database version>\bin, and run the following commands
- pg_ctl.exe start -w -D "C:\SenseDB\<database version>"
- set PGUSER=postgres
- set PGPASSWORD=password
- pg_dumpall.exe > [<path to dump file>]
- pg_ctl.exe stop -w -D "C:\SenseDB\<database version>"