Search code examples
migrationbitbucketofflinedmz

How to migrate Bitbucket to a DMZ server


I'm facing a migration of Bitbucket (version 6.0.0) to another Bitbucket instance (also version 6.0.0) which is inside a DMZ, so I just CANNOT connect both.

I have up, running & configured several repos inside each Bitbucket and now I want to migrate one single project (repo) from one Bitbucket instace to another, but, as stated above: I just cannot connect in any way from original server to final server.

Is there any possibility to export the repo to an USB and then import on the new one (and preserv all commits and traceability)?

Thanks and warm regards


Solution

  • One solution could be as below.

    Clone the repo(with --mirror option) from Bitbucket instance and copy this folder or connect your client machine to the network from where you have access to DMZ.

    Here are the detail steps.

    Migrating Source Code from one Bitbucket instance to another BB instance which is in DMZ.

    1. Create a temporary directory.
    2. Use git clone --mirror to pull down the code and branches from First BB instance.
    3. Change the origin path of git remote set-url origin to set the location. (cmd : git remote set-url origin: ssh://[email protected]:7999/prjname/reponame.git)
    4. Use git push --mirror to send branches to BB2_DMZ_Location server.
    5. Use git push --tags to send tags to DMZ BB server. 6 Delete temporary directory. The source code will be migrated from one BB instance to DMZ BB instance.

    let me know how it goes.