Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need a method to download jira cloud backup to my linux server

durga_panda February 25, 2021

Hi All

I want to download jira cloud backup (which i created for server) and want to download it to a linux server.

I tried 
curl -O --user my.name@domain.com:MY_API_TOKEN https://my.atlassian.net/plugins/servlet/export/download/?fileId=xxxxxxx 

 

even tried replacing wget with CURL but not working.

The url i copied from the download link, but it is not working

I have very limited knowledge on this so need some expert guidance.

2 answers

1 vote
Darryl Lee
Community Champion
February 25, 2021

There's a script for downloading backups from Cloud:

https://bitbucket.org/atlassianlabs/automatic-cloud-backup/src/master/Jira-backup.sh

The curl call they're using is:

curl -s -L -u ${EMAIL}:${API_TOKEN} -X GET "https://${HOSTNAME}/plugins/servlet/${FILE_NAME}" -o "$DOWNLOAD_FOLDER/JIRA-backup-${TODAY}.zip"

I tested it and the -s (silent) isn't required, nor is the -X GET (by default curl does a GET).

The -L (location) flag is important because it makes sure curl follows redirection. This is required because the download link actually sends you to a different endpoint to get the actual file.

You can use -O, but in this example -o allows you to name the backup file something besides "?fileId=a1234567-1234-1234-1234-dad90e3db603"

The other thing is that your example had my.atlassian.net but it needs to be your HOSTNAME.atlassian.net.

0 votes
RJ Gazarek
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 15, 2021

Hi @durga_panda 

Hopefully Darryl's answer was able to help you out.  

Wanted to also invite you to join our closed group, we are looking at improving the backup/restore experience for customers, and want to make sure people have the ability to provide feedback as we build it, and test our the early MVPs.

https://community.atlassian.com/t5/Backup-Restore/gh-p/backupandrestore

Just click that link, request access, and we'll get you in right away!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events