Automate online site-backups for Jira and Confluence without programming

71 comments

Gregor Mitchell
Contributor
January 4, 2023

@César Muñoz I've been trying to get a Linux script to work for this purpose but I have been successful with the powershell version. https://bitbucket.org/atlassianlabs/automatic-cloud-backup/src/master/backup-jira-api-token.ps1

It works.  It's just that it requires a windows server which I don't readily have.  I've run it from my windows 11 desktop successfully.

Like # people like this
Nicolás Guzmán
Contributor
January 25, 2023

Thanks @K_ Yamamoto for your efforts. 

I'm also wondering if this implementation might work for automating Jira Cloud backups for Server?, I mean, to get a backup that I can restore in a Server instance.

Finally, since this backup doesn't include information in Jira Assets, is there any way we can generate one by Automations?

Like # people like this
Vish Reddy {Revyz}
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2023

Hi @Nicolás Guzmán 

I don't believe a backup taken from the cloud can be restored back into a server instance.

Unfortunately I don't believe there is a solution for Automations backup at this point.

 

BTW - We are building support for Jira Assets both backup & granular restore in our Revyz backup as a service app. Happy to share more details if interested.

Like # people like this
Maria Korolenko
Contributor
March 13, 2023

For anyone looking for  "one tool backs up everything, I'd recommend Rewind. We backup Jira, Confluence and Bitbucket. GitHub as well if you're using it. 

Jira Service Management and Jira Work Management are included in Jira backups. 

 It's SOC2 compliant and users who are HIPAA compliant are using Rewind as well. 

The Atlassian team recommends us as their third-party backups for Confluence.  

Like # people like this
Krzysztof Przeor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2023

Hi, I will run the powershell script
https://bitbucket.org/atlassianlabs/automatic-cloud-backup/src/master/backup-jira-api-token.ps1
When I want to automate the download process through the task scheduler, the download hangs :/ The problem does not occur when the script is run manually. With the task scheduler it always hangs from when the copy exceeded 10gb, sometimes 500mb will be downloaded, sometimes 6gb and the file is corrupted. Anyone had this problem and know a solution?

Like # people like this
Dominik Spescha
Contributor
July 20, 2023

Hi everyone
I'm trying to use the Backup script for Jira Cloud. I always get the error "{"message":"Client must be authenticated to access this resource.","status-code":401}" Does anyone know how to solve this? I also tried to modify the curl to use the API Token but still the same.

Like ashleytse likes this
Dominik Spescha
Contributor
July 20, 2023
Like # people like this
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2023

Nice job!

Like ashleytse likes this
adithya
Contributor
October 15, 2023

image.png

Hi,

i have this issue when try to create automation. i fill the headers based on this article.

any idea how to fix it ?

Like ashleytse likes this
adithya
Contributor
October 16, 2023

Hi,

i got Response412Precondition Failed when i try this automation.

 

Date: Mon, 16 Oct 2023 13:01:23 GMT

Content-Type: application/json;charset=UTF-8

Server: AtlassianEdge

Timing-Allow-Origin: *

X-Arequestid: 4dcc80c09590f25e75b01c40059d1e74

Set-Cookie: atlassian.xsrf.token=4254168488df260eeb94784904a3d937e984e26e_lin; Path=/; SameSite=None; Secure

X-Aaccountid: 6024c219f6e6c500690f1077

Cache-Control: no-cache, no-store, no-transform

X-Content-Type-Options: nosniff

X-Xss-Protection: 1; mode=block

Atl-Traceid: 904a6919255d3d46

Report-To: {"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}

Nel: {"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}

Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

Transfer-Encoding: chunked

Nagabharana S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2023

Hi @K_ Yamamoto ,

Just wanted to understand if the above shared steps to backup Jira cloud (auto) would track its activity in logs?

cc : @Aarti Jadhav 

Like # people like this
bhanu teja December 20, 2023

Hi @K_ Yamamoto 

 

we have a requirement In cloud to auto backup I tried the above steps in automation but throwing errorin automation can you please help on this

 

error.png

Like ashleytse likes this
André Bonhôte anb
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 16, 2024

Is there an API documentation to figure out what all the /rest/backup/*-endpoints are doing? I spent a while this morning, to no avail ...

 

Like # people like this
Jack Adams
Contributor
May 29, 2024

Has anyone worked out a method to automate the exports of backups? I've managed to automate the creation of backups with this method but unsure and unable to find anything about actually exporting the backups automatically?

Like ashleytse likes this
César Muñoz May 29, 2024

Hi @Jack Adams 

Atlassian provides scripts to do backup: https://bitbucket.org/atlassianlabs/automatic-cloud-backup/src/master/ 

You have to download and configure the script on your machine, and then schedule it, for instance with Windows task scheduler. Of course, you can't power off your machine when the backup is scheduled because it wouldn't be performed.

Like # people like this
ELFAPP Technologies
Contributor
June 3, 2024

For any administrator who needs an easy solution that integrates well into your Jira site to perform Jira Cloud backups and project exports of any size for all fields conveniently with all data residing within your Jira site. Please see these discussions

Where we explained how our app helps with such use cases.

Like ashleytse likes this
Avikal Gupta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2024

What is the URL of the documentation for JIRA Backup? How that get authenticated using OAuth?

Like ashleytse likes this
Wael
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 3, 2024

The solution is a nice alternative to having to do the manual backup and get a regular automated backup done, wondering if there is a way to exclude -uncheck the box- for the attachments not to be included in the backup.

I've tried removing the cbAttachments or even setting it to "false" still, the backup runs with the attachments box checked.

If anyone has ran into this and has the solution, would be much appreciated sharing it with the community. 

Thank you!

Slava Gefen
Contributor
September 18, 2024

Hiya!

There is a mistake here:

  • Webhook URL{{baseUrl}}/wiki/rest/obm/1.0/runbackup

because {{baseUrl}} already gives /wiki at the end.

So, we have to use:

{{baseUrl}}/rest/obm/1.0/runbackup

With kind regards
Slava 

Christian Schneider
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2024

I am trying to write a script for triggering the Jira Backup Manager. I keep running into response 412 - no matter how long I wait for the next run of the script.

As Jira gives time limitations on how often you can run the web request, it is very difficult do develop a script.

 

Could you introduce a test-flag for the web request? -> While developing, I need the usual responses of the Rest-API without the need to create a real backup.

 

And any help on this one is very much appreciated: https://community.atlassian.com/t5/Jira-Service-Management/How-to-trigger-Jira-Backup-Manager-via-Powershell-gt-keep/qaq-p/2833811

Like Sonya McNeely likes this
JOSHUA H PATCH
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 4, 2024

i've gotten the automations to do *something* for both jira and wiki.  I've noticed the format of the wiki backup is different with the cloud automation vs. the manual verison

manual:
confluence_backup_csv_<date>.zip

  • attachments
    • files whos names resemble registry entries
  •  data
    • <something>.csv.gz
  •  whiteboards
    • data
      • whiteboard_export.csv
  •  metadata.json

automated:

Confluence_export.zip

  • attachment
    • numbered folders
      • files (no extension)
  • entities.xml
  • exportDescriptor.properties

    why are these different? are they both useable for cloud as backups? can confluence be restored from both types?

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events