Open chemicalkosek opened 5 years ago
Currently, we only support a single database, so the existing functionality is expected.
The code for export is here, pull requests welcome!
My Docker knowledge is too thin to help you with the pull request. Could you somehow point me into direction how would I need to run pg_dumpall or maybe pg_dump against another database within dokku postgres service?
There isn't any docker knowledge necessary here. I'm quite literally just running the pg_dump
command in that script (its a few lines down from the link I sent).
Maybe we could add another argument to specify the table to use in the export. That way, it would be more clear that the db is exporting only one table. Is there any contribution guidelines? Never done this before but I could probably try a PR, looks like simple fix.
Pull requests welcome. I get to them as I have time.
Looks like a good alternative would be exposing the pg_dumpall
command
Though I'm not sure if pg_dumpall
would fit in as a replacement for the current functionality or something in addition (and how that fits into the organization of this plugin)
I have deployed a Prisma Server like this: https://www.prisma.io/tutorials/deploy-prisma-to-dokku-ct15
I have named the dokku postgres service 'prismadb'. The Prisma Server is working fine. But I need to do backup of the service.
dokku postgres:export prismadb > prismadb.dump
gives me:
It's empty, but it should contain some data which I have added. So after doing:
dokku postgres:connect prismadb
prismadb=# \l
I get:
So after checking logs I see that Prisma during deploy is creating a 'prisma' database. The data is there, I checked. How can I export all databases from the service? Seems like the
dokku postgres:export prismadb > prismadb.dump
is only exporting the database which is named like the service.