Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. READ MORE

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
Lauri
Specialist
Specialist

I'd also add two steps to step 13:

c. Click "Service cluster" and "OK"

d. Update the network paths to the shared folders

Contributors
Version history
Last update:
4 weeks ago
Updated by: