Migrating database to Dokploy
I want to migrate several applications to Dokploy and I was wondering what would be the best way to do this. Specifically migrating the databases. Here's how I was thinking to solve this:
1. Dump the existing database
2. Install the same application on Dokploy
3. Share the database dump through a bind mount volume with the database container
4. Connect to the database container with a terminal and import the data using the CLI
Is this the way to go or is there an easier method?
5 Replies
i think you got it, at least that's how i imagined it. running postgres on my staging server, backs up to backblaze
good to know 🙂
Yeah you can do that or open the database to internet and then import the backups in tools like pgadmin, mysqlworkbench which allows to you to import backups easily
that sounds a lot quicker, thanks for the tip!
I did the same yesterday to move some projects to dokploy. i dumped the the sql from my server and then sent the dump to my dokploy server. then i executed the follow command to import: docker exec -i <container> /bin/bash -c "PGPASSWORD=<db_password> psql --username <db_username> <db_name> " < dump.sql