Configuring Bitbucket Data Center to work with Amazon Aurora

Still need help?

The Atlassian Community is here for you.

Ask the community

These instructions will help you connect Bitbucket Data Center to an existing Amazon Aurora PostgreSQL database. 

Amazon Aurora is only supported on a Data Center license

Bitbucket Data Center supports the use of a single-writer, PostgreSQL-compatible Amazon Aurora clustered database. A typical production-grade cluster includes one or more readers in a different availability zone. If the writer fails, Amazon Aurora will automatically promote one of the readers to take its place. For more information, see Amazon Aurora Features: PostgreSQL-Compatible Edition.

The overall process for using a PostgreSQL-compatible Amazon Aurora database with an existing Bitbucket deployment is:

  1. Deploy Amazon Aurora (preferably, through the Modular Architecture for Amazon Aurora PostgreSQL Quick Start).
  2. Configure PostgreSQL on the Amazon Aurora database.
  3. Connect your Bitbucket deployment to the Amazon Aurora database.

See Supported platforms for the versions and configurations of Amazon Aurora supported by Bitbucket Data Center.

Backups (for migrations)

If you are migrating Bitbucket Server data from the HSQL internal database, back up the Bitbucket Server home directory.

If you are migrating Bitbucket Server data from another external database, back up that database by following the instructions provided by the database vendor before proceeding with these instructions.

See Data recovery and backups.

1. Deploy Amazon Aurora

tip/resting Created with Sketch.

Use the Quick Start for new deployments

If you are deploying a new Bitbucket Data Center with Amazon Aurora from scratch, we recommend that you use the AWS Quick Start for Bitbucket. This Quick Start lets you configure a PostgreSQL-compatible Amazon Aurora cluster with one writer and two readers (preferably in separate availability zones). See Deploy Bitbucket Data Center in AWS for more information.


Bitbucket Data Center specifically supports the use of an Amazon Aurora cluster with the following configuration:

  • It must have only one writer, replicating to one or more readers.

  • Your PostgreSQL engine must be version 9.6 or higher.

See Supported platforms for more details.

AWS documentation

AWS has some helpful guides for setting up an Aurora database and migrating to it:

Amazon also offers an AWS Database Migration Service to facilitate a managed migration. This service offers minimal downtime, and supports migrations to Aurora from a wide variety of source databases.

When migrating from a non-clustered PostgreSQL database into an Amazon Aurora database, we recommend you use pg_dump and pg_restore. For more information, see Backup and Restore (from the PostgreSQL documentation).


2. Connect Bitbucket to the Amazon Aurora database

You can now connect Bitbucket to the PostgreSQL database, when you either:

  • Run the Setup Wizard (at install time)
  • Want to migrate Bitbucket to PostgreSQL (either from the embedded HSQL database or from another external database)

When running the Setup Wizard at install time

  1. Select External at the 'Database' step.
  2. Select PostgreSQL for Database Type.
  3. Complete the form. See the table below for details.
  4. Click Next, and follow the instructions in the Setup Wizard.

When migrating to Amazon Aurora

  1. In the Bitbucket administration area, click Database (under 'Settings').
  2. Click Migrate database.
  3. Select PostgreSQL for Database Type.
  4. Complete the form. See the table below for details.
  5. Click Start Migration.



Hostname

The hostname or IP address of your Amazon Aurora database.

Port
The TCP port with which Bitbucket can connect to the database server. 

Database name
The name of your Amazon Aurora database.

Database username
The username that Bitbucket should use to access the database.

Database password
The password that Bitbucket should use to access the database.




Last modified on Feb 2, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.