Moving Atlassian Bitbucket Server to a new computer

6 Responses

  1. Ramana Rainn says:

    Thanks for detail migration steps. I’m planning to migrate Bitbucket server to new server by using same SQL database.

    Below are the steps
    – Install latest Bitbucket version on new server.
    – Create the new database on different database server and make the changes to bitbucket.properties. This is to test the application before go live
    – Stop the Bitbucket server on new server
    – Take SQL backup from old database and restore it to new database
    – Copy the Home directory from old server to new server
    – Start the Bitbucket server instance
    – Test the Projects and Repositories on new server.

    Before we go live on new server, I’m planning to just update the old database name and server details on bitbucket.properties and then sync the final home directory to new directory. Do you see any issue with this approach?. or Do we just the restore final DB backup from old server to new server?

    Also is there any way to migrate only some project repositories so that we can test it before we sync the home directory?

    • John Kouraklis says:

      Before we go live on new server, I’m planning to just update the old database […]

      You mean the new database, right?

      Do you see any issue with this approach?. or Do we just the restore final DB backup from old server to new server?
      I think it will work. What system are you on? Maybe you need to change the folder permissions on Linux distributions

      Also is there any way to migrate only some project repositories so that we can test it before we sync the home directory?

      Perhaps if you copy only the repos you want. But then, you need to copy any secondary folders to make it work and this can become complicated. I think the safe bet here is to copy the whole Home Directory. If you have huge projects/repos I understand why you are considering this

  2. Ramana Rainn says:

    Thanks John for your reply. Currently We are on Windows 2008 R2 server and I’m planning to install on Windows 2016 with latest Bitbucket version.

    Once I test the bitbucket application on new server by using new database, then during go-live I would like to perform below steps. Do you see any issue with this approach?.

    – Stop the bitbucket on old server
    – Stop the bitbucket on new server
    – update the bitbbucket.properties on new server to use old database name and old database server
    – Sync the home directory between old bitbucket server and new bitbucket server
    – Start the bitbucket on new server
    – Test the bitbucket on new server

    • John Kouraklis says:

      Hi,
      the sequence of events as you describe them make sense and I am pretty sure you will not get any conflicts. As long as the two servers do not use the same repo at the same time I think you can safely migrate your data as you describe

  3. Frankie says:

    I recently wrote a piece on the importance of restores where I give practical example on how to use Docker to spin up an Atlassian BitBucket and a MySQL container and import your existing backup. It may come in handy to check your backups (the ideia) and may also help some readers who are here trying to migrate to a new computer. By spinning up a container you’ll get instant feedback on the issues ahead.

    http://wasteofserver.com/restore-backups-ugly-duckling/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.