TL;DR: please, could you tell me a relatively quick, easy way to set Bitbucket (Server v5.13.0) to either be completely inaccessible, or to be read-only mode, for all Bitbucket users, but without shutting down the Bitbucket instance?
This question is similar to How to switch Bitbucket to read-only mode (posted back in 2020). That post includes a link to this Read only tool but I am not clear as to whether this tool will accomplish what I need.
Why: I am performing a simultaneous migration and upgrade of Bitbucket (going from one Linux server environment to another Linux server environment, and from Server version to Data Center version). Additionally, in case this might be relevant, this will also be a migration from a systemd deployment to a Docker container deployment.
During this migration and upgrade, I would like to immediately stop anyone from writing or modifying anything in Bitbucket on the old instance. Our Bitbucket is hosting over 1000 repos. I would like the Bitbucket instance to continue running during the migration.
The solution could be either preventing all access to all users, or forcing all users to be read-only access mode.
Perhaps controlling by IP address, like this article Control access to your private content
Eventually, I would like to have all users only be able to do read-access on the old server. But for now, during the migration, I want to ensure nobody updates or adds to any repo on the old server.
Many thanks.
The Python script does exactly what I was going to suggest.
Locking BBServer
Unlocking BBServer
Note that as far as my limited understanding of Python goes, the script does not handle project wide branch permissions that are inherited by repos.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.