Bitbucket DIY Backup - getting 400 error when unlocking via REST

I'm running Bitbucket Server 4.14.1.

I'm writing my own DIY backup script based on the documentation. (https://confluence.atlassian.com/bitbucketserver/using-bitbucket-server-diy-backup-776640056.html)

I'm able to lock, start backup, check draining status, update progress, and complete backup via the REST API. (These include HTTP GET and POST.)

However, I am unable to unlock (HTTP DELETE). I get a 400 Bad Request. If I use the unlock token via the UI it works.

Also, I can not cancel the backup (also HTTP DELETE). I get a 405 error. Using the cancel token in the UI works. ('Cancel' is demonstrated in the Atlassian DIY scripts in common.sh.)

BITBUCKET_URL='http://localhost:7990'
Using curl on CentOS 7.

1 answer

Update on my unlock issue. I had inadvertently copied an invisible character (& nbsp;) from the page regarding DIY backups. It was being treated as part of the HTTP method "DELETE& nbsp;".
The unlock works now after cleaning up that string.

However, I'm still having issues performing the "cancel backup via curl" call. Either the "cancel" URL/method is incorrect or else I just need to set the backup progress=100 (effectively ending it) before unlocking.

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

28,015 views 26 12
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