How can I do it ?
I ask about how to connect to database on fly and write backup file on my local disc.
Hi… For small to medium-sized databases, the easiest way is to tunnel through with flyctl proxy:
https://fly.io/docs/postgres/connecting/connecting-with-flyctl/
Then, use pg_dump (or pg_dumpall) analogously to how psql is invoked in that example.
Hope this helps!
Aside: You do need to keep the flyctl proxy command running—and use a separate terminal window for the subsequent command. (This surprises some people.)
2 Likes
Thank you very much. It works. I didnt know about separated proxy connection.
1 Like
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.