Hello,
I am looking for some guidance on migrating from Stash v3.10.2 on an existing Windows server to a new Windows server running BitBucket v5.8.1. I have installed BitBucket on the new server already and matched all general settings between Stash/BitBucket.
The SQL database associated with the Stash v3.10.2 instance is on an SQL server which both servers have access to, the new instance of BitBucket is still using the out the box database for now.
Could someone please advise of the correct procedure migrating the old data into the new instance on the new server?
Am I better upgrading the existing server from Stash to BitBucket prior to migrating data?
Any help will be greatly appreciated.
Kind Regards
Craig
The only way to migrate the data is to upgrade your existing instance. You can do it in 2 ways.
1. Use the recommended installer approach to upgrade your existing Stash to Bitbucket Server latest version. Then move it to the new server
2. Use the manual approach to point the new Bitbucket installation to a copy of your old installations home folder and database
In both cases, Bitbucket will be upgraded with your existing data. Even in the case of #1, you will end up pointing the new server to a copy of the existing Home folder and DB but the upgrade would have already completed in the old server itself.
Given that you already installaed Bitbucket server in the new machine, #2 might be easier. See https://confluence.atlassian.com/bitbucketserver/upgrade-bitbucket-server-from-an-archive-file-779292682.html for more details.
Please make sure you test this before migrating the actual data. And make sure you have backup of the old instance, in case you need to revert back.
Hi Jobin
Thanks for that, can you please advise how I point the new install of BitBucket to the existing SQL database?
Keeping in mind my new installation does not have a bitbucket.properties file as it's still using the out the box database. Apparently I need to migrate the existing database to SQL before it create's the file, but I dont really need to migrate the existing database to SQL, as I already have an SQL DB I want to connect to.
I have created a file named bitbucket.properties in the data folder of the home folder and restarted services. The file contains:
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc:sqlserver://192.168.1.243:1433;databaseName=AtlassianStash;
jdbc.user=g****
jdbc.password=*****
Yet, when I start BitBucket it is still advising me to migrate to a database type other than internal.
What I have done so far:
1. Installed new instance of BitBucket on new server.
2. Backed up and restored the AtlassianStash database to the new SQL server. (old instance of Stash currently connected to it)
3. Moved the Home Folder to the new server in separate location from the installation directory. (path has changed from old server D:\SVN is not R:\BitBucket on new)
4. Used the set-bitbucket-home.bat file to set the home directory of my new BitBucket installation to the home folder moved from the old server.
I think setting the SQL is the last piece of the puzzle.
Also just one more question, I assume I can rename or delete the default "R:\Atlassian\ApplicationData\Bitbucket" home folder created by the installation?
Regards
Craig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And yes, you can delete the old home folder but I wouldn't do it until the migration is successful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jobin
Thanks for that, I could not get BitBucket to pickup the new home folder or the bitbucket.properties file within, despite changing the system variable and editing/running the set home folder batch file. After moving the data I ended up running the upgrade to 5.10 and pointing it to the new directory. All seems to be working after that.
Thanks
Craig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.