Skip to content

Data Branching®

Create a development or staging environment for your database pre-seeded with data and schema

Overview

The PlanetScale Data Branching® feature (beta) allows you to create isolated copies of your database that include both the schema and data. This differs from our regular branching feature, which only includes the schema.

This feature is only available for organizations on the Scaler Pro plan.

Note

The Data Branching® feature is currently in beta.

Enable the Data Branching® feature for your database.

Before you can use the feature, you have to enable it in your database settings page.

  1. Navigate to the database that you'd like to enable.
  2. Click on the "Settings" link in the header navigation bar.
  3. Scroll to the option with the text "Enable Data Branching®"
  4. Enable this option and click "Save database settings".

Create a development branch with data & schema from the Base branch

  1. After enabling the Data Branching feature, navigate to the dashboard page of the database.

  2. Clicking on "New Branch" should now offer an option to select "Seed Data".

    • None — Creates a database branch with only the schema copied to the new branch.
    • From most recent backup — Creates a database branch with both the schema and data from the latest backup of the Base branch.

  3. Once you've selected an option, click "Create branch" to create a new branch.

FAQ

  1. Can I pick which backup is used for the new branch?

    PlanetScale picks the latest backup so that your new branch has the latest dataset to work with.

  2. Can I pick which tables are copied into the new branch?

    PlanetScale seeds the new branch with all the schema & data from the base branch. We do not offer a way to filter out data or schema when creating a new branch.

  3. Is data in the new branch kept up to date with changes to the base branch?

    PlanetScale does not provide data syncing between a production branch and a development branch.

  4. When I merge my deploy request, will any data changes be merged back to the base branch?

    PlanetScale does not provide data syncing between a production branch and a development branch.

  5. Will enabling the Data Branching® feature affect my billing?

    PlanetScale will bill for the data inside of the new branch as part of your overall database's plan. In this way, it is no different than if you filled the branch up manually.

Need help?

Get help from the PlanetScale support team, or join our GitHub discussion board to see how others are using PlanetScale.

Was this page useful?
Last updated on Help us improve this page