jira automated backupscript not able to download backup zip file

Hello,

I was trying to use the automated backup script available from

backup script

I was able to start the backup but the download fails it give me  

HTTP/1.1 401 Unauthorized

I was able to login fine when i try manually to login to the site with the same session id

It fails to authorized only when i try to go to download page.

Any idea why it fails to authorize for download page ? 

Below is the log

DEBUG output created by Wget 1.14 on linux-gnu.

 

URI encoding = âUTF-8â

 

Stored cookie visionway.atlassian.net -1 (ANY) / <session> <secure> [expiry none] atlassian.xsrf.token BEBH-V2SM-TGGA-X6S4|25b8551fde79075db91829236ca76d6dfd0548a4|lout

Converted file name 'jira_export_20170504_114809.zip' (UTF-8) -> 'jira_export_20170504_114809.zip' (UTF-8)

--2017-05-04 11:53:54--  patht to zip file

Resolving visionway.atlassian.net (visionway.atlassian.net)... 165.254.226.113

Caching visionway.atlassian.net => 165.254.226.113

Connecting to visionway.atlassian.net (visionway.atlassian.net)|165.254.226.113|:443... connected.

Created socket 4.

Releasing 0x00000000016569c0 (new refcount 1).

Initiating SSL handshake.

Handshake successful; connected socket 4 to SSL handle 0x000000000166b8e0

certificate:

  subject: /C=US/ST=California/L=San Francisco/O=Atlassian Network Services, Inc./CN=*.atlassian.net

  issuer:  /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA

X509 certificate successfully verified and matches host visionway.atlassian.net

---request begin---

GET //plugins/servlet/ondemandbackupmanager/download/2233fabb-61de-4260-a4f8-414387469b44/jira_export_20170504_114809.zip HTTP/1.1

User-Agent: Wget/1.14 (linux-gnu)

Accept: */*

Host: visionway.atlassian.net

Connection: Keep-Alive

Cookie: atlassian.xsrf.token=BEBH-V2SM-TGGA-X6S4|25b8551fde79075db91829236ca76d6dfd0548a4|lout

 ---request end---

HTTP request sent, awaiting response...

---response begin---

HTTP/1.1 401 Unauthorized

1 answer

This widget could not be displayed.

You need to do it in a two step rocket..

One wget will authenticate and return the cookie. Next request will download the file, but with the cookie file received from the first call. 

 

Example here:

https://stackoverflow.com/questions/1324421/how-to-get-past-the-login-page-with-wget

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

534 views 23 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you