Please refer to the Replibyte documentation to fit this guide to your need.
Replibyte is an open-source tool to seed your database with production data while keeping sensitive data safe.
I assume you have already created a database dump with Replibyte and you are ready to use replibyte restore
command. If it's not the case,
please refer to how to create a dump.
Note ✨: you can use the Qovery Cronjob to regularly create a dump of your database.
Before moving forward, modify replibyte.yaml
with your configuration. In my example, I use a local dump instead of a dump on
a S3 bucket, which is just for the demo purpose
- Fork this repository
- Modify the
replitye.yaml
to reflect your database configuration. - Create a Lifecycle Job
- Select your forked repository with the appropriate branch (e.g.
main
) - Set the "Root application path" to the example you want to use (e.g.
examples/seed-a-database-with-replibyte
) - Set the "Dockerfile path" to the Dockerfile in the example you want to use (e.g.
Dockerfile
) - Select "Start" event and add the following CMD Arguments:
["-c","replibyte -c replibyte.yaml dump restore remote -v latest"]
- which indicates that you want to restore the latest dump. Please refer to the Replibyte documentation for more information. - Create your Lifecycle Job but do not deploy it yet.
- Go to your Lifecycle Job variables and create a
DATABASE_URL
environment variable alias to provide to replibyte your database connection string where to restore your seed. - Deploy your Lifecycle Job.
Your database is now seeded with your production-like data.