How to find out when the Bitbucket server was upgraded
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
For certain reasons (such as auditing), information regarding the last time Bitbucket was upgraded is needed.
Solution 1
To find out the latest upgrade made in the application, follow steps below:
Go into the $BITBUCKET_HOME/log directory.
Locate the atlassian-bitbucket-YYYY-MM-DD.logs.
Search for the string "Upgrading Bitbucket from” in the log files.
Here's a sample entry:
1
2024-03-10 09:00:01,850 INFO [spring-startup] c.a.s.internal.home.HomeValidator Upgrading Bitbucket from 8.7.1 to 8.9.10
Note that Bitbucket keeps the atlassian-bitbucket-YYYY-MM-DD.log
for 31 days only by default.
Solution 2
Run the following script against the database.
1
SELECT * FROM databasechangelog ORDER BY orderexecuted DESC
Make note of the date in the dateexecuted column of the most recent entry. Here's a sample table record:
1
2
3
4
id |author |filename |dateexecuted |orderexecuted|exectype|md5sum |description |comments |tag|liquibase|contexts|labels|deployment_id|
-------------------------------+-----------+------------------------------------------+-----------------------+-------------+--------+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---+---------+--------+------+-------------+
BBSDEV-27581-1 |djansons |liquibase/r8_9/upgrade.xml |2023-10-16 01:47:58.383| 846|EXECUTED|8:c2ef3ad59d963a50fc30f5e17487fab6|addColumn tableName=bb_comment_thread | | |4.8.0 | | |7381270608 |
...
Not all upgrades contain database schema updates. This is normal and if your most recent upgrade was only a patch or between certain minor versions, this may not show the most recent upgrade.
Was this helpful?