Backup Progression check using Automation for Jira
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
Check the % completion of a Backup initiated using Automation for Jira.
Created an automation rule which will trigger a backup for the site on a remote windows/linux server on a scheduled timing.
Find % completion of the backup triggered as it will run at background.
Add the % completion in the audit log of the automation rule.
Diagnosis
Use the below link which provides the TaskId of the last backup kicked off.
https://<sitename>.atlassian.net/rest/backup/1/export/lastTaskId
The once you have the taskID, from the previous step you can use the link below
https://<sitename>.atlassian.net/rest/backup/1/export/getProgress?taskId={lasttaskID}
You will get a result as below :
1
2
3
4
5
6
7
8
{
status: "Success",
description: "Cloud Export task",
message: "",
result: "",
progress: 100,
exportType: "",
}
Solution
To automate the same, you can follow the steps below :
Use the trigger → Scheduled
Add a new action "Send web request"
Record the https://<sitename>.atlassian.net/rest/backup/1/export/lastTaskId in the Webhook URL.
Add the headers :
Authorization Basic <emailaddress:apitoken encoded as base64>
Add an action called "Create variable"
Provide the variable name
Pass the smart value
1
{{webhookResponse.body}}
Add a new web request again
Pass the variable on the send web request action url as mentioned in the screenshot
Add a log action
Pass the smart value
ℹ️ Note: Service limits will be bothered if the rule is executed multiple times.
Was this helpful?