Hello,
at present, the scripts here
https://bitbucket.org/atlassianlabs/automatic-cloud-backup/src/master/
are all we've got to build an automatic backup procedure for JIRA Cloud. Fine.
How can we change/use the backup-jira-api-token.sh script to perform a data-only backup excluding attachments, avatars, and logos ?
Thank you
Pierangelo
Hi @Pierangelo Repetti ,
In order to change the backup script so that it does not include attachments you have to change line 31 of the backup-jira-api-token.sh script:
BKPMSG=$(curl -s -u ${EMAIL}:${API_TOKEN} -H "Accept: application/json" -H "Content-Type: application/json" --data-binary '{"cbAttachments":"true", "exportToCloud":"true"}' -X POST https://${HOSTNAME}/rest/backup/1/export/runbackup )
Specifically, you have to change the payload sent with the request from:
{"cbAttachments":"true", "exportToCloud":"true"}
To:
{"cbAttachments":"false", "exportToCloud":"true"}
Please test this and let me know if it works.
Also, I will try to modify the script so that it is possible to configure at the top of it whether the backup is for Server or Cloud and whether to include the attachments.
Cheers,Dario
I applied the change you suggested. I think it is working because the zip file created by the script is much much smaller than the full backup I created from JIRA administration.
I'll accept your answer.
A parameter in the configuration section would be great.
Thank you very much.
You are very welcome @Pierangelo Repetti ,
As soon as I will have some time I will try to add those properties to the top of the script.
Ciao,Dario
Just FYI, I have committed the updated Bash scripts to backup Jira and Confluence Cloud so that you can choose:
Please test them and let me know if they work.
Hello Dario,
I tested the Confluence script, it is working.
Thanks for your work.
You are very welcome @Pierangelo Repetti !
Please send me a link to Jira: to generate a backup for Cloud
hi @Dario B
Will "cbAttachment":"true" cover also Avatars and logos?.
Regards
It looks like you're new here. Sign in or register to get started.