Seeding database in Preview environments

Hi, my use case is to use the Preview Environment. But in our preview environment we want to seed our database with initial set of data so that it has our existing data in it. If our production or blueprint environment’s database has the data in it and then we create preview environment from that, would the database of the preview environment have the data or production/blueprint environment that also?

To summarize, we want the RDS of the preview environment to be the snapshot of the actual RDS of production/blueprint environment.

1 Like

Hi @shaider,

Thanks for asking. You have 2 solutions

Replibyte - an open-source tool to seed database

Replibyte is an open-source tool that we created at Qovery to seed a development database with your production database while keeping sensitive data safe. This tool is still under active development but is used by Fortune 500 companies.

You can find the complete documentation here.

https://www.replibyte.com

Seed via a script

I do recommend looking at this tutorial to see how you can seed your database via an Entrypoint script. It will work nicely.

Note: Replibyte will be integrated into Qovery at some point.

Update: there is a third option to consider for Postgres - Neon