Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUNBACKUP_URL not found #12

Open
ilienert opened this issue Aug 7, 2017 · 6 comments
Open

RUNBACKUP_URL not found #12

ilienert opened this issue Aug 7, 2017 · 6 comments

Comments

@ilienert
Copy link

ilienert commented Aug 7, 2017

backup.sh fails to generate any backup and I receive no error messages. I drilled it down to this line:

BKPMSG=$(curl -s --cookie $COOKIE_FILE_LOCATION --header "X-Atlassian-Token: no-check" -H "X-Requested-With: XMLHttpRequest" -H "Content-Type: application/json" -X POST $RUNBACKUP_URL -d "{\"cbAttachments\":\"${ATTACHMENTS}\" }" )

The curl command seems to fail due to the fact that RUNBACKUP_URL points to a nonexistent URL. I get a "Oops, you've found a dead link" response from the server. Has the format of the URL changed recently? The script was working before, several months ago.

Thanks!

@bwegman
Copy link
Contributor

bwegman commented Aug 7, 2017

It seems the URLs do have changed. I have created a separate fork that has the changes necessary to support the new URLs for Jira. I have not tested this for confluence.

See: bwegman@6dec239

@ilienert
Copy link
Author

ilienert commented Aug 7, 2017

Thanks for the prompt reply @bwegman. However, I have a new problem with the following line

BKPMSG=$(curl -s --cookie $COOKIE_FILE_LOCATION 'https://pitcrew.atlassian.net/rest/backup/1/export/runbackup' \ -XPOST \ -H 'DNT: 1' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/javascript, */*; q=0.01' \ -H 'X-Requested-With: XMLHttpRequest' \ --data-binary '{"cbAttachments":"true", "exportToCloud":"true"}' )
The result is

BKPMSG='{"message":"Client must be authenticated to access this resource.","status-code":401}'

I double checked my credentials and they look fine. Could it be because I already initiated a backup within the last day?

@bwegman
Copy link
Contributor

bwegman commented Aug 7, 2017

Oops. That's my mistake. I used a hardcoded URL (to pitcrew.atlassian.net, our JIRA instance).

I've updated my fork to use the $RUNBACKUP_URL. If you update to the latest version on my fork it should work.

@ilienert
Copy link
Author

ilienert commented Aug 7, 2017

Ah, thanks! I didn't catch that :)

@mattock
Copy link
Owner

mattock commented Aug 8, 2017

@bwegman : care to issue a PR for the URL changes?

@bwegman
Copy link
Contributor

bwegman commented Aug 8, 2017

Ofcourse: #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants