I have been running a script that pulls for a backup and I stored in my own datastore. But since around September 21th confluence backups are failing with:
"HTTPError: 406 Client Error: Not Acceptable for url: https://<MYCOMPANY>.atlassian.net/wiki/rest/obm/1.0/runbackup"
What would be the reason for this sudden breakage?
thanks!
Your script is probably the one that logs in as a standard user. Cloud has moved over to using Atlassian accounts, so your script is not able to log in any more. It will need to be adapted to use an Atlassian account.
Just FYI, this script just worked today:
#!/bin/bash##---Fill-up the user account details, instance url and timezone-----USERNAME=USER_NAME_HEREPASSWORD=PASSWORD_HEREINSTANCE=INSTANCE.atlassian.netLOCATION="/path/to/download/folder"# Set this to your Atlassian instance's timezone.# See this for a list of possible values:# https://en.wikipedia.org/wiki/List_of_tz_database_time_zonesTIMEZONE=Europe/Amsterdam##----START-----###echo "Starting the script..."# Grabs cookies and generates the backup on the UI. ########### PLEASE NOTICE THAT THE SESSION IS CREATED BY CALLING THE JIRA SESSION ENDPOINT!!! ########## THE SCRIPT DOES NOT WORK IF JIRA IS NOT INSTALLED !!! #######TODAY=$(TZ=$TIMEZONE date +%Y%m%d)COOKIE_FILE_LOCATION=jiracookiecurl --silent --cookie-jar $COOKIE_FILE_LOCATION -X POST "https://${INSTANCE}/rest/auth/1/session" -d "{\"username\": \"$USERNAME\", \"password\": \"$PASSWORD\"}" -H 'Content-Type: application/json' --output /dev/null## The $BKPMSG variable will print the error message, you can use it if you're planning on sending an emailBKPMSG=$(curl -s --cookie $COOKIE_FILE_LOCATION --header "X-Atlassian-Token: no-check" -H "X-Requested-With: XMLHttpRequest" -H "Content-Type: application/json" -X POST https://${INSTANCE}/wiki/rest/obm/1.0/runbackup -d '{"cbAttachments":"true" }' )## Checks if the backup procedure has failedif [ "$(echo "$BKPMSG" | grep -ic backup)" -ne 0 ]; thenrm $COOKIE_FILE_LOCATIONecho "FAILED, IT RETURNED $BKPMSG"exitfi## Checks if the backup exists every 10 seconds, 2000 times. If you have a bigger instance with a larger backup file you'll probably want to increase that.for (( c=1; c<=2000; c++ ))doPROGRESS_JSON=$(curl -s --cookie $COOKIE_FILE_LOCATION https://${INSTANCE}/wiki/rest/obm/1.0/getprogress.json)FILE_NAME=$(echo "$PROGRESS_JSON" | sed -n 's/.*"fileName"[ ]*:[ ]*"\([^"]*\).*/\1/p')##ADDED: PRINT BACKUP STATUS INFO ##echo "$PROGRESS_JSON"if [[ $PROGRESS_JSON == *"error"* ]]; thenbreakfiif [ ! -z "$FILE_NAME" ]; thenbreakfisleep 10done#If after 20 attempts it still fails it ends the script.if [ -z "$FILE_NAME" ];thenrm $COOKIE_FILE_LOCATIONexitelse## PRINT THE FILE TO DOWNLOAD ##echo "File to download: $FILE_NAME"curl -s -L --cookie $COOKIE_FILE_LOCATION "https://${INSTANCE}/wiki/download/$FILE_NAME" -o "$LOCATION/CONF-backup-${TODAY}.zip"firm $COOKIE_FILE_LOCATION
I ran this script and throws this error
FAILED, IT RETURNED Backup frequency is limited. You can not make another backup right now. Approximate time till next allowed backup. 3h 45m
Can't I change the backupu frequency limit or force backup?
It looks like you're new here. Sign in or register to get started.