Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
FranciscoQ
Partner - Creator
Partner - Creator

Automation for Backing up Qlik Applications in Github

 

So I create this automation, which basically every time an up is published, will take some information from the app, like the name and space name, it will export the app without data, will have a variable with the date when the app is being published and then will create a backup of the app (without data) in Github. This is very important to have previous versions stored in case we change something from the app, we publish it and then if the last changes didn't work well, we can go back in time to previous versions. 

 

FranciscoQ_0-1642192759078.png

 

So the variable block it has a date function: 

FranciscoQ_1-1642192968004.png

 

And then, the "create file content block" of GitHub: Will have the user and repo name, and the path will be Space Name / APP Name & Date. So for each space, I will have a list of the apps published with the date and time, so I have the complete history of all the versiones published.

FranciscoQ_2-1642193029780.png

The versions will be stored inside the directory with the name of the space, and inside the directory will be all the apps from the space, with the different versions of when the app was published:

FranciscoQ_3-1642193520620.png

 

 

First of all I would like some feedback of the automation. What things I could improve.

Second, I was thinking to create an automation that publish all the apps from different spaces into managed spaces. I wonder what will happen with this automation to create backups, since it start running every time an app is published (webhook run mode). Will create like a queue of the apps that has to store in github, or will be interrupted every time a new up is published before the previous one has been stored ? (In case the action of publishing finish before the app is stored in githun, maybe I could put both actions (Publish and Backup in Github) in one automation.

 

Thank!

 

Francisco

 

 

 

Labels (4)
1 Solution

Accepted Solutions
Vinay_B
Support
Support

Hi @FranciscoQ ,


Please check this post: https://dataonthe.rocks/whats-in-it-for-them/ 

It has a detailed flow on how to build the automation for backing up apps to Github.

I hope this helps!

If this resolves your query, please click on "Accept as Solution" for confirmation. Thanks!

View solution in original post

11 Replies
Vinay_B
Support
Support

Hi @FranciscoQ ,


Please check this post: https://dataonthe.rocks/whats-in-it-for-them/ 

It has a detailed flow on how to build the automation for backing up apps to Github.

I hope this helps!

If this resolves your query, please click on "Accept as Solution" for confirmation. Thanks!
PietMichielRappelet
Former Employee
Former Employee

Hi 

Some additional links that can help you:

PietMichielRappelet_0-1642405083404.png

 

 

 

hope this helps. 

Harsha-Lodha
Contributor III
Contributor III

@FranciscoQ This is very great automation. I am working on building something similar. But I am not able to find way to get triggered when app is published. May I know where is the first block you used? "App Published". Thank you!

OdieW
Contributor III
Contributor III

I'm sure you've figured this out by now, but for anyone else finding this post with the same question, the App Published block is just the initial block from a new automation. To get it to be App Published you choose webhook, then qlik sense cloud connector, then when an app is published.

Harsha-Lodha
Contributor III
Contributor III

Yes I figured it after a while. Also apart from this I have another question about importing qlik apps from github. I was able to design an automation to import from github. But I am confused about the "import App from base 64 encoded file" with Autoreplace mode.

I understood how the block works in import mode as NEW. It imports the required app with app name given in the 'target app' field. And app is imported in the space as per field 'space id'. App id field is not used in that case. 

But what happens I use import mode as Autoreplace?

Does my App which has same app name as 'Target app' field from the space mentioned in 'Space Id' field gets replaced by imported app completely? Or does it merges with imported app with Target app? And what does App Id field is used for? Please describe autoreplace mode in detail. I want my target app to change completely as per imported app. But I don't want my target my app id to change. But in reality I when I sue autoreplace mode instead of replacing my existing my target app, automation creates new app with same name target app. Thank you in advance.

DaveChannon
Employee
Employee

Hi @Harsha-Lodha the autoreplace function is an internal method, and isn't usable via external API calls. Please see the documentation on that API endpoint here.

Harsha-Lodha
Contributor III
Contributor III

 

Hey @DaveChannon,

Thank you so much for the explanation. If the Autoreplace option isn't for external calls, could you explain why it's included as a mode option? Will it be available for external API calls in the future? If not, is there another way to replace an existing app with an imported one?

Thank you!

DaveChannon
Employee
Employee

I can't comment on why it was added, but I'll raise a request to remove it - thank you for the feedback there.

There is no clean way to overwrite an app in a personal or shared space while maintaining the ID.

(There is a hacky API way, where you can move the app to a managed space, import the new app, publish over the app in the managed space, delete the imported app, then move the managed space back to the original space...)

Harsha-Lodha
Contributor III
Contributor III

Hello @DaveChannon , 

Thank you so much for the explanation that really helps. While we have our daily backup going on. I get this one error randomly sometimes for random app. The backup for same app happened successfully next day or day before. Can you please tell what causes this error. Also how can I handle this. Thank you!

Main error stays same 

Screenshot 2024-08-16 at 9.38.14 AM.png

Details from chronological section changes everyday for random apps

once I got this

Screenshot 2024-08-16 at 9.44.03 AM.png

 

 

 

 

 

 

 

Once I got this

Screenshot 2024-08-16 at 9.49.36 AM.png