Skip to main content
Announcements
Talend Data Catalog 8.0 End of Support: December 31, 2024 Get Details

How To Take Backup And Restore Qlik Sense Enterprise on Windows

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_Seo
Support
Support

How To Take Backup And Restore Qlik Sense Enterprise on Windows

Last Update:

Jul 8, 2024 5:58:33 AM

Updated By:

Sonja_Bauernfeind

Created date:

Oct 19, 2017 9:47:06 PM

This article contains steps on how to do backup and restore the Qlik Sense Enterprise on Windows (QSEoW) site.

For full instructions on how to backup and restore a Qlik Sense site, see the online help under Backup and restore Qlik Sense Enterprise on Windows.
For sole database backup information article can be found here: How to backup PostgreSQL database in Qlik Sense


Backup and Restore Targets:

  1. Qlik Sense Repository Database
  2. Certificates
  3. Apps used by Qlik Sense
  4. The Repository Content used by Apps    

Environment

  • Qlik Sense Enterprise on Windows, June 2017 and up
These steps are provided as-is based on latest version available of Qlik Sense product at the time of writing and/or last update to the article. Please make sure to cross-reference these steps with the official documentation for your product version under Backup and restore Qlik Sense Enterprise on Windows.


Step 1: The Qlik Sense Repository Database

Backing up Qlik Sense Repository Database:

Downtime is required
  1. Stop all Qlik Sense Services except for "Qlik Sense Repository Database" on Windows Server manager (services.msc)
  2. Create c:\backupfolder
  3. Open CMD.ext as administrator
  4. Go to "bin" folder
     Note: the directory name will reflect your postgre version (9.6, 11.x, etc..).
    cd "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin"​
             
  5. Take PostgreSQL backup. There will be a password prompt for the postgres account.
    Note: If postgres db password is unknown, see How-to reset forgotten PostgreSQL password in Qlik Sense 
      .\pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\backup\QSR_backup.tar" QSR​
  6. Check for any errors/warnings and that the backup file size after command execution finishes. It should not be 0kb.

Restoring Database (PostgreSQL):

Option 1: Restoring on the same machine (PostgreSQL)

  1. Create c:\backup folder
  2. Move the backup file (Repository dump) into c:\backup
  3. Stop all Qlik Sense services
  4. Start the Qlik Sense Repository Database only
  5. Open up cmd.exe as an administrator
  6. Go to PostgreSQL folder
     Note: the directory name will reflect your postgre version (9.6, 11.x, etc..).
    cd "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin" ​
  7. Drop the current database
     .\dropdb.exe -h localhost -p 4432 -U postgres QSR
  8.  Create a new template database
     .\createdb.exe -h localhost -p 4432 -U postgres -T template0 QSR​
  9. Restore database
    .\pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\backup\QSR_backup.tar"​
  10. Restart Windows OS and All Qlik Sense services

   
      For further reference, consult the Qlik Sense Help Site for your respective version. 

Option 2: Restoring on a different machine (PostgreSQL)

  1. Create c:\backup folder
  2. Put the backup file (Repository dump) into c:\backup
  3. Install Qlik Sense of a new machine
  4. While the Qlik Sense installation process, uncheck the check box to start services after installation in case extra configuration is needed before Qlik Sense initializes.
  5. Once the installation has finished, start the Qlik Sense Repository Database only
  6. Move the PostgreSQL backup file (c:\backup\QSR_backup.tar) into a new server. from old server to local disk on the new server
  7. Go to the "bin" folder
    1. Open CMD.exe as administrator
    2. Go to PostgreSQL directory
      cd "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin"
  8. Create the template database

    Note: If database has already been created on a new machine, you need to delete the current database first. Otherwise the error "createdb: database creation failed: ERROR: database "QSR already exists" will be displayed.

    Run the following commands in order to drop and then create the database:
    1. Drop database (if one exists):     
      .\dropdb.exe -h localhost -p 4432 -U postgres QSR​
    2.  Create temp database:    
      .\createdb.exe -h localhost -p 4432 -U postgres -T template0 QSR​
  9. Restore the database by running the following command:
    .\pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\Backup\QSR_backup.tar"​
  10. Change directory to the Repository installation folder:
    cd "C:\Program Files\Qlik\Sense\Repository"
  11. Start the repository service with the two distinct commands:
    .\repository.exe -standalone -restorehostname 
  12. When QRS is up and running, restart the QRS without -restorehostname.
  13. If a new share path is going to be used then:
    1. Open QlikSenseUtil.exe  (default location C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\)
    2. Click Connect to database and enter valid credentials for the postrgres or qliksenserepository user
  14. Optionally, changing machine name in database:

    Note: The LocalConfigs table has been removed as of Qlik Sense Feburary 2019 release and newer
                 
  15. Restart Windows OS and all Qlik Sense services
  16. Important: If PostgreSQL has been migrated with a different Hostname (Machine name), All functions of QMC are disable and become gray out due to missing RootAdmin role. In order to resolve this issue. Please refer to this article How To Allocate RootAdmin Role To UserID After Qlik Sense Migration -QMC became Gray Out

 

Step 2: Certificates

Backing up The Certificate

Please refer to the Backing up Certificates Help site documentation for details and verify that the information matches your current version.

Restoring The Certificate

Please refer to the Restoring certificates Help site documentation for details and verify that the information matches your current version.

Step 3: Apps used by Qlik Sense

Backing up the Apps used by Qlik Sense

  1. Check "CLUSTER SETTINGS" in Qlik Management Console (QMC)
    These can be found in the QMC in CONFIGURE SYSTEM >> Service cluster
  2. Confirm the Share path:
    service cluster.png
  3. Copy the Apps folder for backup.

 

Restoring Apps used by Qlik Sense:

  1. Copy and paste all sub-folders from the UNC root specified in the Service Cluster Section in the QMC on the old server into a newly configured UNC path for the new server
  2. Move or copy the backed Apps up into the "Share" folder in a new Qlik Sense machine.
  3. If path of Shared folder need to be changed, Please follow this article How to change the share path in Qlik Sense June 2017 or higher
     

Step 4: The Repository Content used by Apps

Backing up the Repository Content used by Apps:

Normally, It is similar to the section for apps, the path where these files live is in the StaticContent folder on the Share path.

Restoring the Repository Content used by Apps:

  1. Go to the Service cluster tab  "QMC >> Service cluster "
  2. Enter in the root, app folder, static content folder, connector folders and archive log folders and press save

Related Content

Restoring a Qlik Sense site to a machine with a different hostname 

Labels (1)
Comments
sri_c003
Partner - Creator II
Partner - Creator II

We are trying to test the backup and restore of Qlik Sense server (onto a different box) for our organization.

Qlik Sense version: Feb 2020 Patch 2

Source: dev1623

Target: dev123

Trying to restore from one host to another - all OS parameters remain same.

1. Took a backup of QSR from source

2. Installed Qlik Sense manually, installed patch (ensured "start services" is deselected).

3. On the target, dropped existing QSR, created a new one, and loaded the backed up QSR from source.

Stuck at step K now:

K. Change directory to the Repository installation folder and start the repository service with the two distinct commands:
cd "C:\Program Files\Qlik\Sense\Repository"
repository.exe -standalone -restorehostname

I did the same on my target box - dev123. There was some CPU activity on repository service, and then all went silent. The Repository Service under Windows services did not start.

 

I overlooked that, and went ahead with step L.

L. If a new share path is going to be used then, open QlikSenseUtil.exe  (default location C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\)
Click Connect to database and enter valid credentials for the postrgres or qliksenserepository user

It did connect to database, but when i had "connection checker" button selected, and then clicked on "OK" below, it failed at connecting.

image.png

Am I missing something? Help please.

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @sri_c003 

The messages in the screencap seem to indicate a connection error on the listed ports to the listed machine/IP address. Are the relevant services online and are certificates available? 

As this guide was originally written for 2017, I'd recommend the Help link for your version for review as well: Restoring a Qlik Sense SiteMake sure to select your version, though I believe nothing changed between Feb 2020 and Jun 2020.

If you require more assistance with this I would recommend posting your query on the Qlik Sense Deployment forum to get more visibility for the question. 

 

sri_c003
Partner - Creator II
Partner - Creator II

Second issue noticed in Feb 2020 P2:

K. Change directory to the Repository installation folder and start the repository service with the two distinct commands:
cd "C:\Program Files\Qlik\Sense\Repository"
repository.exe -standalone -restorehostname

I did the same on my target box - dev123. There was some CPU activity on repository service, and then all went silent. The Repository Service under Windows services did not start.

The only way out of this was to use the repository.exe -standalone -restorehostname -bootstrap and start the dispatcher service when it is waiting at main. Not sure if this is the correct process or not to use the -bootstrap option but this is the only way it worked.

sri_c003
Partner - Creator II
Partner - Creator II

I wish there was an option to edit the comment posted, atleast within a few minutes.

Deleting earlier comment and updating it here.

@Sonja_Bauernfeind

The target box is one of our frequently used Qlik boxes. I merely removed all traces of existing Qlik and repurposed it as the target for DR testing. All ports are open and certificates are available.

Infact, I was able to get to the QMC and hub, and also open a few apps. But what is failing still is accessing the database from a tool like above.

From what I noted, after a fresh/clean install of Qlik Sense with "start services" deselected, this issue occurs.

No services started after a clean install; started the Repository Database - fails to connect.

No services started after a clean install; started the Repository Database, followed steps to restore Qlik Sense QSR database from Source, started all services - fails to connect.

This works though when I select "start services" on installation process.

Below is the message I see when trying to connect via a 3rd party tool. The tool connects with no issues on Qlik Sense installation with "start services" selected.

Capture.PNG

sri_c003
Partner - Creator II
Partner - Creator II
muthukrishnabalaji
Contributor
Contributor

Hi Team, I was able to go till version folder(9.6), after that not able to see bin folder. Is there any specific reason for not able to see bin folder? 

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @muthukrishnabalaji 

The \bin folder will exist in this location (or Postgres would not function): C:\Program Files\Qlik\Sense\Repository\PostgreSQL\12.5\bin (in my example I use 12.5)

There is, however, no \bin folder in the ProgramData folder (I know I sometimes went there by accident and got confused where it went): C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\12.5

All the best,
Sonja 

muthukrishnabalaji
Contributor
Contributor

Hi all, thanks for response. In our server it is installed in different drive(F:). I can see bin folder there. 

Lauri
Specialist
Specialist

Hi, I successfully restored a Sense site to a new server, but some of the streams are missing -- they're not visible in the QMC or in the QSR "Streams" table. Everything else appears to be present. What's my best course of action? 

Lauri
Specialist
Specialist

I'd recommend referencing the information in the below case; I had to apply the query to all four DBs in my new postgres immediately after restoring them.

https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-Repository-won-t-start-Inactive-l...

Contributors
Version history
Last update:
‎2024-07-08 05:58 AM
Updated by: