Exporting and Importing Security rules. Qlik Sense to Git

Alex Polorotov
4 min readApr 4, 2022

This article is intended as a guide for those who are faced with the situation to figure out who made a disaster because of editing of Security Rules and how to roll back to the last stable version of Security Rules.

Many Qlik administrators are familiar with the situation when someone with access to QMC has changed several Security Rules and this brings to every user's (with Professional License) ability to see and edit Data Load Script in a published app.

This could have happened for many reasons, but in this article, we will not deal with the cause. Let’s figure out how to live with it after and how to quickly restore a backup of your Security Rules.

Wait…backup?!

There are two groups of people: those who do backup, and those who will start doing backup.

Ways of back-up of Security Rules

There are different ways to make a backup of security rules:

  • Export it using Qlik-Cli.
  • Figure out how to install outdated qmcu-rule-manager on new Qlik Sense releases.
  • Version security rules in the Git repository or in a JSON file using Gitoqlok.

The first step involves having access to a Qlik server and some scripting skills or copy-pasting skillset :)

The third step is the easiest way to make a quick backup and restore it when it is really needed through a visual interface without installing any third-party software on your server.

How to backup security rules using Gitoqlok

First, install Gitoqlok into your browser from Chrome Web Store. Find Gitoqlok in a Chrome Web Store and press the Install button.

chrome web store page

Gitoqlok is the freemium easy-to-use version control tool that works from your browser. It integrates your Qlik Sense app with git repository through GitHub, Gitlab, Gitea, AWS Commit, BitBucket APIs without any third-party servers between.

After doing that configure your Gitoqlok profile on the options page of the Gitoqlok Chrome extension. It brings up to communicate Gitoqlok with your Git repository (it is required only if you want to save your Security Rules into a specific Git repository).

Gitoqlok option page

If you are not familiar with GitHub or Gitlab there are some helpful links in the end of article.

When you have successfully configured Gitoqlok follow instructions from the video below:

Security rules import and backup using Gitoqlok
  1. Go to the Qlik Sense Hub and click on the “Env Migration” button in the Gitoqlok extension.
  2. Select security rules which you want to export to your Git repository or want to save into a JSON file.
  3. Press the Export button.

Now, you have a backup of your Security Rules and could easily restore them by Gitoqlok.

How to restore a Security Rules backup using Gitoqlok

Just go into the Import section on the “Environment Migrator” page and select a JSON file or a Git repository that contains Security Rules.

Restore a backup of Security Rules

Gitoqlok would show you the difference between the saved version of Security Rules and the current state. So, you could easily decide what to do with a conflict.

Security Rules difference viewer

Conclusion

So, that's how you can make a backup of Security Rules and restore the backup using Gitoqlok.

I hope it was useful and interesting for you.

Let me, know if you have any questions about Gitoqlok — my Linkedin.

P.S. Don’t forget to subscribe to me on Youtube, because we have a series of Tip&Tricks videos around Qlik Sense and Git integration.

Useful links:

--

--

Alex Polorotov

Maximizing BI adoption | Dataholyc | Qlik Partner Ambassador