Hello,
I'm currently running Bitbucket 5.3 under the atlassian bitbucket-server docker image.
I'd like to upgrade to the latest bitbucket and at the same time perhaps move from mysql to postgress.
Can anyone tell me if the docker images in particular allow for version upgrades and if so, are there appropriate version hops to take?
Hi @MrFollies ,
The short answer is that you shouldn’t need to do any version hops. This is largely true for versions of Bitbucket Server/Stash even further back.
There is one caveat: starting somewhere around Bitbucket 6.x, we stopped using the built-in daemon user and moved to setting up a dedicated user account inside the container. The bitbucket user has a different UID/GID, and so on first time startup the image’s bootstrap process is likely to detect these different permissions and will set the appropriate permissions before starting the app. Depending on the size of your installation this could take a while.
As an alternative, as part of your migration process you could stop the old image, recursively set the ownership of your $BITBUCKET_HOME (which I presume is stored externally somewhere) to 2003:2003 which is the UID:GID of the built-in bitbucket user, and then start the new version of our Docker image.
Let us know how you go!
Cheers
Dave
Cheers Dave,..
In the end I went from 5.x -> 5.16 -> 6.0 -> 6.10 -> 7.0 -> 7.3
What you describe is exactly the experience I had, with two exceptions.
1. The uid/gid settings did not get fixed automatically. I needed to adjust these myself.
2. The other issue I saw (Not sure which version) is the location of the actual repos moved from: /var/atlassian/application-data/bitbucket/shared/repositories to
/var/atlassian/application-data/bitbucket/data/shared/repositories
As such I could log in and see all of my projects but each repo acted as if it were empty, until I moved them...
Such an awesome product and a painless upgrade!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @MrFollies
#2 is interesting, because this location didn't change in the product itself, or in the associated Docker image. BITBUCKET_HOME has always been /var/atlassian/application-data/bitbucket and bitbucket's shared home has always been ./shared directly underneath BITBUCKET_HOME. Is it possible your volume mount options changed?
In any case, great to hear you're all upgraded!
Cheers
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm,... It looks a little off still..
The server is working ok but the paths look strange (I was guessing at the path in my last message and it looks like I have that wrong)...
Here's what it looks like: (I added the symlink to fix things)
root@dd04c017159e:/var/atlassian/application-data/bitbucket/shared# ls -als
total 28
0 drwxr-xr-x 13 bitbucket bitbucket 198 Jun 3 04:58 .
0 drwxr-xr-x 12 bitbucket bitbucket 187 Jun 9 07:37 ..
8 drwx------ 2 bitbucket bitbucket 4096 Jun 3 00:11 analytics-logs
0 drwx------ 4 bitbucket bitbucket 79 Jun 15 2017 bin
0 drwx------ 6 bitbucket bitbucket 67 May 10 23:41 caches
0 drwx------ 5 bitbucket bitbucket 53 Jun 3 06:15 config
0 lrwxrwxrwx 1 bitbucket bitbucket 11 Jun 3 03:25 data -> shared/data
0 drwx------ 2 bitbucket bitbucket 55 Sep 20 2016 export
0 drwx------ 3 bitbucket bitbucket 63 Jul 10 2017 lib
4 -rwx------ 1 bitbucket bitbucket 17 Jun 8 07:03 .lock
8 drwx------ 4 bitbucket bitbucket 4096 Jun 3 00:25 log
0 drwx------ 4 bitbucket bitbucket 50 Jun 3 02:02 plugins
0 drwx------ 5 bitbucket bitbucket 233 Jun 3 12:11 search
0 drwx------ 6 bitbucket bitbucket 102 Jul 10 2017 shared
4 drwx------ 21 bitbucket bitbucket 4096 May 10 23:41 tmp
4 -rwx------ 1 bitbucket bitbucket 61 Mar 9 2018 .version
root@dd04c017159e:/var/atlassian/application-data/bitbucket/shared# ls -las shared
total 8
0 drwx------ 6 bitbucket bitbucket 102 Jul 10 2017 .
0 drwxr-xr-x 13 bitbucket bitbucket 198 Jun 3 04:58 ..
4 -rwx------ 1 bitbucket bitbucket 504 Sep 20 2016 bitbucket.properties
0 drwx------ 4 bitbucket bitbucket 60 Jun 15 2017 config
0 drwx------ 8 bitbucket bitbucket 125 Jun 3 03:29 data
4 -rwx------ 1 bitbucket bitbucket 16 May 10 23:40 .lock
0 drwx------ 3 bitbucket bitbucket 31 Sep 20 2016 plugins
0 drwx------ 5 bitbucket bitbucket 92 Jul 10 2017 search
I suspect I need to remove the symlink and move shared/data in its place.
Then the shared directory is probably not used at all? I mean $BITBUCKET_HOME/shared/shared can't be right can it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
it depends on of your docker image configs.
I saw some images include everything, some has dedicated rdbms, app, nginx etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's the official Altassian image for bitbucket...
I've made backups and I'm just trying it....
Unless someone knows the right way for sure, I'll post my findings after I've done a successful migration...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.