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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,826 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you