Upgrade Bitbucket without downtime
Before you begin
Before you start planning a rolling upgrade, there’s a few questions you need to answer.
Does my Bitbucket deployment support rolling upgrades? | You can only perform a rolling upgrade with no downtime on a multi-node Bitbucket cluster. Clustering is only supported on a Bitbucket Data Center license. In addition, a rolling upgrade involves enabling upgrade mode, which is only available in Bitbucket Data Center. |
Do I have enough nodes to support user requests during the rolling upgrade? | You need to take a node offline to upgrade it. During this time, other active nodes will take over the offline node’s workload. Make sure you have enough active nodes to handle user traffic at any given time. Whenever possible, add a node temporarily to your cluster to compensate for offline nodes. |
Prepare for the rolling upgrade
1. Complete pre-upgrade checks
- Check the Version specific upgrade notes for the version you plan to upgrade to (and any in between).
- Go to > Support Tools, then review the Log analyzer for any issues that may need to be resolved.
Check the compatibility of your apps with the version you plan to upgrade to.
- Go to > Manage apps > Bitbucket update check.
Choose the version you plan to upgrade to then hit Check.
2. Prevent the installation or upgrade of apps during the upgrade period
If you manage Bitbucket with a team of admins, schedule the rolling upgrade with them. Notify them to postpone any app installs or upgrades until after the rolling upgrade. Installing or upgrading apps during a rolling upgrade could result in unexpected errors.
3. Back up Bitbucket
Determine which backup strategy to use.
- Back up all the data in your Bitbucket home directory and external database.
If your deployment is hosted on AWS, we recommend that you use the AWS native backup facility, which utilizes snapshots to back up your site. For more information, see AWS Backup.
4. Set up a staging environment to test the rolling upgrade
We strongly recommend that you perform the rolling upgrade on a staging or test environment first.
- Create a staging copy of your current production environment.
- Follow the steps below to upgrade your test environment.
- Test any unsupported apps, customizations and proxy configuration (if possible) before upgrading your production environment.
Perform the rolling upgrade
There are three methods for performing a rolling upgrade, depending on what orchestration tools your deployment uses:
Method | Description | Instructions |
---|---|---|
Manual upgrade | A manual upgrade is suitable for deployments that feature minimal orchestration, particularly in node upgrades. If your deployment is based on our Azure templates, you'll also need to perform a manual upgrade. | |
AWS CloudFormation | If your deployment is defined by an AWS CloudFormation template (like our AWS Quick Start), then you can use the same template to orchestrate your upgrade. | |
API-driven | You can orchestrate the entire rolling upgrade process through API calls. |