Restoring a Qlik Sense site
The following items need to be considered when restoring a site:
- Qlik Sense software
-
If you want to restore the site to a central node with a new hostname there are additional considerations. For more information, see Restoring a Qlik Sense site to a machine with a different hostname.
- Repository database: The database contains all configuration data for the site.
- Certificates for the Qlik Sense services: The certificates are used to encrypt the traffic between the services and the users. Make sure to backup the certificates in order not to lose any encrypted data (for example, passwords for data connections).
- Log data
- Application data: The data models in the Qlik Sense apps.
- Any content that supports the apps (for example, QVD files)
When performing the procedure below you must log in using an account that had the Root Admin role when the site was backed up. If you log in using a local admin account and the machine name is different, your permissions will not follow through.
Do the following:
- Restore the certificates used to secure the Qlik Sense services.
- Install Qlik Sense on the computer where you plan to restore.
- Start the Qlik Sense repository database (QRD).
- Restore the repository database:
- Place the backed up repository database on the machine targeted for the restore.
Open a Command Prompt with administrator privileges in Microsoft Windows.
- Run the following commands to restore the repository database (adjust the paths as needed):
cd "%ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin"
createdb -h localhost -p 4432 -U postgres -T template0 QSR
pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\QSR_backup.tar"
If the command fails because a database already exists, run the following command and then repeat the createdb command:
dropdb -h localhost -p 4432 -U postgres QSR
-
Restore log and application data to the file share used for storage of log and application data.
- Restore any supporting content to its original location as required.
- Start the Qlik Sense services. If the services are started manually, start them in the following order:
-
Qlik Sense repository service (QRS)
If the user running Qlik Sense services is not local administrator on the machine, you need to start Repository.exe from an elevated command prompt using the -bootstrap parameter.
See: Services
- Qlik Sense proxy service (QPS), Qlik Sense engine service (QES), Qlik Sense scheduler service (QSS), and Qlik Sense printing service (QPR) in no specific order
The order is important because the QRS is dependent on the QRD and the rest of the services are dependent on the QRS.
Restoring a Qlik Sense site to a machine with a different hostname
You can restore a Qlik Sense site to a machine with a host name that is different from the site that you backed up. However, if the machine is a central node in a multi-node site, you need to slightly adapt the procedure as follows:
- All rim nodes need to be reset, that is, you need to remove them and then add them again.
- Run repository.exe -bootstrap -standalone -restorehostname from an elevated command prompt to start the Qlik Sense repository service (QRS). When QRS is up and running, restart the QRS without -restorehostname.
See: Services
When restoring your site, you must log in using an account that had the Root Admin role when the site was backed up. If you log in using a local admin account and the machine name is different, your permissions will not follow through.
Backing up the current server
Perform the following steps on the server machine that you want to restore to a different server.
- Create a local folder called Backup or something similar to store the files you want to restore later. For example: C:\ProgramData\Qlik\Sense\Repository\Backup.
-
In Qlik Management Console, go to the Certificates section and export new certificates using the FQDN of the new server. Ensure tht you include the private key and the certificates must be in the Windows format.
- Backup your certificates using the Microsoft Management Console (MMC). For detailed steps, see Backing up certificates. On your original server, export the following certificates from the QMC to your Backup folder. Ensure that you export the private key.
- client
- root
- server
- On the service cluster, open the your backup location QMC, Cluster Settings, copy the full UNC path of the QlikShare (the full path name including back slashes), for example \\<computer_name>\QlikShare
-
In Windows, Services, stop all services, except the Qlik Sense repository database.
- Backup the QSR database. For detailed instructions, see Backing up a Qlik Sense site. Copy the database dump file to your backup folder.
- Copy all sub folders from the QlikShare (the path specified in the Service Cluster section of the QMC) to your backup folder.
- Copy your Backup folder from the current folder to the same location on your target machine.
Restoring to a machine with a different host name
Perform the following steps on the target server machine, where you want to restore Qlik Sense.
- Create a QlikShare folder on the target server computer. For example, create a folder called QlikShare on the C:\ drive.
- Move your backup folder and database dump file to your target server machine.
- Restore the the following backed up certificates from the old machine used to secure the Qlik Sense services:
- client
- root
- server
- Install the same version of Qlik Sense on the computer where you plan to restore. Do not start the services until you have finished the configuration steps.
- Start the Qlik Sense repository database (QRD) service.
- Restore the backup copy of the repository database:
Open a Command Prompt with administrator privileges in Microsoft Windows.
- Run the following command to restore the repository database on a clean server:
- "pg_restore.exe -h localhost -p 4432 -U postgres -d QSR "c:\QSR_backup.tar"
Information noteYou may need to adjust the path "c:\QSR_backup.tar" depending on where you backed up your database dump file. - Navigate to: cd "%ProgramFiles%\Qlik\Sense\Repository\PostgreSQL\<database version>\bin"
- Run createdb -h localhost -p 4432 -U postgres -T template0 QSR.
If the command fails because a database already exists, you get the following error message: createdb: database creation failed: ERROR: database "QSR" already exists - Run dropdb -h localhost -p 4432 -U postgres QSR to drop the database.
- Execute the createdb command again. createdb -h localhost -p 4432 -U postgres -T template0 QSR
If running this command on a server where a repository database may have been previously installed, you may get the following error message:
pg_restore: [archiver (db)] connection to database "QSR" failed: FATAL: database "QSR" does not exist
If you get this error, follow the steps below:
- Restore the log and application data to the QlikShare folder.
To launch Qlik Sense with the new hostname:
Open a Command Prompt with administrator privileges in Microsoft Windows.
Change the directory to the Repository installation path
- Default path: C:\"Program Files"\Qlik\Sense\Repository
Execute the following command:
Repository.exe -bootstrap -standalone -restorehostnameWhen the command has completed successfully check for erros in the logs and the following message is displayed:
Bootstrap mode has terminated. Press ENTER to exit..
- Start the Qlik Sense services. If the services are started manually, start them in the following order:
- Qlik Sense service dispatcher
- Qlik Logging Service
- Qlik Sense repository service
- Qlik Sense proxy service
- Qlik Sense engine service
- Qlik Sense scheduler service
- Qlik Sense printing service
- Try to access the QMC or the Hub to verify that the migration has been successful. Also, from the Qlik Management Console reload the monitoring apps to verify that your certificates have been installed correctly.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!