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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Pierangelo Repetti ,
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.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dario,
I tested the Confluence script, it is working.
Thanks for your work.
Pierangelo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome @Pierangelo Repetti ! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please send me a link to Jira: to generate a backup for Cloud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Quang Pham ,
I am not sure I understand what you are asking for, since the endpoints to start a backup are listed in the scripts you can find in the repository mentioned in the very first message of this thread:
In case this won't help, kindly provide more details on what you are trying to do/achieve
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dario B I am running this script successfully but I am interested in finding an alternative to this script that will run the backup for server. How can I modify this script to grab that backup instead of the backup for Cloud?
Background; we're trying to develop a method of off-site automated backups.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ethan Vaughan ,
I am only working with Cloud products so I might not be the best person to help here.
However, once this has been said, as mentioned in Configuring automatic database backups documentation page, for PROD Jira Server and Datacenter sites we advise to take DB backups instead:
For large Jira installations and regular backups in production, we strongly recommend that you use native database backup tools instead of Jira's XML backup service.
Native database backup tools offer a much more consistent and reliable means of storing (and restoring) data while Jira is active. When Jira is in use, there’s no guarantee that XML backups will be consistent as the database may be updated during the backup process. Jira doesn't report any warnings or error messages when an XML backup is generated with inconsistencies and such backups will fail during the restore process.
For more details on this please see the Backing up data documentation page.
If for some reason this is not desired, another option would be to install Jira Server on a VM and take snapshots.
Finally, if you really want to have something like the Cloud backup scripts, you can proceed as it follows:
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.