Bitbucket Data Center upgrade guide
Plan your upgrade
1. Determine your upgrade path
You can update from any previous version of Bitbucket Server (or Stash) to the latest version, as there is no required upgrade path.
Bitbucket Data Center and Server 8.x is a major upgrade
Be sure to read the Bitbucket Server 8.0 release notes, take a full backup, and test your upgrade in a non-production environment before upgrading your production site.
Upgrading from a version older than Bitbucket 8.x disables all user-installed apps on startup
Be sure to update your own apps and check the Atlassian Marketplace to ensure 3rd-party apps are compatible with Bitbucket Data Center and Server 8.x before upgrading.
Upgrading to the next bug fix update
If you are upgrading a multi-node Bitbucket cluster to the next bug fix update (for example, from 8.0.0 to 8.0.1), you can upgrade with no downtime.
2. 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.
3. Upgrade Bitbucket in a test environment
- 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.
Upgrade Bitbucket Data Center
1. Back up your data
Determine which backup strategy to use.
- Back up all the data in your Bitbucket home directory and external database.
2. Stop the cluster
You must stop all the nodes in the cluster before upgrading. For more info, see Starting and stopping Bitbucket.
We recommend configuring your load balancer to redirect traffic away from Bitbucket until the upgrade is complete on all nodes.
3. Download Bitbucket
Download the appropriate file for your operating system - https://www.atlassian.com/software/bitbucket/download-archives.
4. Upgrade the first node
- Extract the files to a directory. This will be your new installation directory and it must be different from your existing installation directory.
Update the value of BITBUCKET_HOME in the
<Installation-directory>/bin/set-bitbucket-home.sh
file so the new Bitbucket installation points to your existing Bitbucket home directory.If you’re using a BITBUCKET_HOME environment variable to specify the home directory location, no change is required.
Copy any other immediately required customizations from the old version to the new one. For example, if you aren’t running Bitbucket on the default ports or if you’re managing users externally, you'll need to update or copy the relevant files.
If you’ve configured Bitbucket to run as a Linux service, don't forget to update its service configuration as well. Learn more about running Bitbucket as a Linux service
- Start Bitbucket on the node. Learn more about starting Bitbucket
Why doesn’t Bitbucket search work after the upgrade?
When you’re starting up your Bitbucket Data Center instance after the upgrade, the bundled search server won’t run. Instead, the remote search will be started.
This happens because Data Center instances use the remote search, not the bundled search.
During the upgrade, the --no-search
flag is inserted in the /etc/init.d/atlbitbucket
file. This flag allows running the remote search but blocks the bundled search.
5. Copy Bitbucket to remaining nodes
The next step is to replicate your upgraded Bitbucket directories to other nodes in the cluster.
Stop Bitbucket on the first node.
Copy the installation directory and local home directory from the first node to the next node.
If the path to the local home directory is different on this node, edit the /bin/set-bitbucket-home.sh to point to the correct location.Start Bitbucket, and confirm that everything works as expected.
Stop Bitbucket on this node before continuing with the next node.
Repeat this process for each remaining node.
6. Start Bitbucket and check cluster connectivity
Once all nodes have been upgraded you can start Bitbucket Data Center on each node, one at a time (starting up multiple nodes simultaneously can lead to serious failures).
The Cluster monitoring console (Administration > Settings > Clustering) includes information about the active cluster nodes. When the cluster is running properly, you should be able to see the details of each node.