Migrate from MySQL to Postgres with minimal fuss. This quickstart template uses CDC and makes incremental data syncing a breeze. Discover how simple database migration can be with Airbyte and Terraform.
Download our free guide and discover the best approach for your needs, whether it's building your ELT solution in-house or opting for Airbyte Open Source or Airbyte Cloud.
Welcome to the "Mysql to Postgres Incremental Data Stack" repository! This repo provides a quickstart template for building a one-off database migration solution from an existing MySQL database to a Postgres database with incremental sync using Airbyte. We will easily migrate the tables and data from the MySQL database to the Postgres database with Airbyte using Change Data Capture (CDC). While this template doesn't delve into specific data, its goal is to showcase how the database migration solution can be achieved with Airbyte.
Just like other Airbyte quickstarts, this quickstart is designed to minimize setup hassles and propel you forward.
Before you embark on this integration, ensure you have the following set up and ready:
Get the project up and running on your local machine by following these steps:
For Linux & Mac:
For Windows:
Airbyte allows you to create connectors for sources and destinations, facilitating data synchronization between various platforms. In this project, we're harnessing the power of Terraform to automate the creation of these connectors and the connections between them. Here's how you can set this up:
Change to the relevant directory containing the Terraform configuration for Airbyte:
Within the infra/airbyte directory, you'll find three crucial Terraform files:
Adjust the configurations in these files to suit your project's needs. Specifically, provide credentials for your Postgres and MySQL connections. You can utilize the variables.tf file to manage these credentials.
This step prepares Terraform to create the resources defined in your configuration files.
Before applying any changes, review the plan to understand what Terraform will do.
After reviewing and confirming the plan, apply the Terraform configurations to create the necessary Airbyte resources.
Once Terraform completes its tasks, navigate to the Airbyte UI. Here, you should see your Postgres source and MySQL destination connectors, as well as the connection between them, set up and ready to go.
Once you've set up and launched this initial integration, you can proceed to sync the connection to trigger a one-off migration. The real power of this quickstart lies in its adaptability and extensibility. Here’s a roadmap to help you customize and harness this project tailored to your specific data needs:
The real beauty of this integration is its extensibility. Whether you want to add more MySQL sources, migrate to more than one Postgres databases, integrate additional tools, or modify the sync schedule – the floor is yours. The granularity of the migration can also be set by selecting the correct sync mode for each stream (table). Read sync mode for more details. With the foundation set, sky's the limit for how you want to extend and refine your data processes.
Download our free guide and discover the best approach for your needs, whether it's building your ELT solution in-house or opting for Airbyte Open Source or Airbyte Cloud.