Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

upgrade stucked at 'The target installation directory is not empty'

Jozsef Toth July 22, 2020

I have decided to upgrade my old 7.1.0 instance to fresh 7.4.0.

 

I followed the upgrade guide. When I stared the installer (linux shell), :

--------------------------------

sudo ./atlassian-bitbucket-7.4.0-x64.bin

Starting Installer ...

Bitbucket 7.4.0 installation wizard
Would you like to install or upgrade an instance?
Install a new instance [1, Enter], Upgrade an existing instance [2]
2

Upgrade Bitbucket 7.4.0
What type of instance are you looking to upgrade?
Upgrade an existing Server instance [1, Enter], Upgrade an existing Data Center instance [2], Upgrade an existing Smart Mirroring instance [3]
1
Where should Bitbucket be installed?

Select the folder where you would like Bitbucket 7.4.0 to be installed, then
click Next.
[/opt/atlassian/bitbucket/7.4.0]

/app/bitbucket

The target installation directory is not empty.
Where should Bitbucket be installed?

Select the folder where you would like Bitbucket 7.4.0 to be installed, then
click Next.

[/app/bitbucket]

----------------------------------------

The upgrade script stucked here and constantly returning to this question even if I have chosen the upgrade option at start.... The upgrade guide mentioned that I have to locate the old installation home, but how to upgrade if the installer claims that the old directory (what I want to upgrade) is not empty?

 

1 answer

1 vote
Anton Shaleev
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 3, 2020

Hey Josef

Very good question on the upgrade with the installer!

So let set some terminology before proceeding:

  • Bitbucket home directory - directory with application data, repositories, logs, caches, and shared directory with bitbucket.properties. Here is stored everything related to you exact Bitbucket instance. The backup of this directory is the most important. (default path: /var/atlassian/application-data/bitbucket)
  • Bitbucket installation directory - directory with the application binaries, java libraries, elasticsearch libraries. This directory stores the executable binaries and OS specific libs required to run Bitbucket. The only customization here are bin/set-bitbucket-home.sh and bin/set-jre-home.sh which are pointing to Bitbucket home directory and Java home directories respectively. (default path: /opt/atlassian/bitbucket/<version_number>

As all you instance information is stored in Bitbucket home the upgrade is actually setting up new binaries and then pointing them to existing Bitbucket home. Which means that you need to set up 7.4.0 binaries side by side into empty directory (and not over the old binaries!) with 7.1.0. And then point it to existing Bitbucket home directory.

So sequence will be the following:

sudo ./atlassian-bitbucket-7.4.0-x64.bin

Starting Installer ...

Bitbucket 7.4.0 installation wizard
Would you like to install or upgrade an instance?
Install a new instance [1, Enter], Upgrade an existing instance [2]
2

Upgrade Bitbucket 7.4.0
What type of instance are you looking to upgrade?
Upgrade an existing Server instance [1, Enter], Upgrade an existing Data Center instance [2], Upgrade an existing Smart Mirroring instance [3]
1
Where should Bitbucket be installed?

Select the folder where you would like Bitbucket 7.4.0 to be installed, then
click Next.
[/opt/atlassian/bitbucket/7.4.0]

/path_to_installation/7.4.0

Default location for Bitbucket home directory

The location for Bitbucket data.
Please provide the location of your existing home directory, where your
repositories, plugins, and other data are stored.

Be sure to STOP your current instance and create a backup before proceeding.

So you need to stop the instance if you didn't and then past the path of the directory with the application data (which should be different from the directory with the installation binaries).

 

Kind Regards

Anton

Jozsef Toth August 10, 2020

Thank you very much, now it has been upgraded successfully and working!

Like Anton Shaleev likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events