download snapshots?

I have a postgres (unmanaged) running on fly for last 2 years.

I have tried to connect to it via
fly proxy 4544:5432 -a <myappname> but that results in command hanging for a very long time.

the postgres app has a volume with 5 snapshots. I want to download the latest one. and try to run it locally with my postgres.

What would be the best way to go about this?

Hi… The best way would be to restore the snapshot into a new database app and then pg_dump from in there. (You can use fly sftp get to download the resulting dump file, assuming it’s small—or at least medium-sized.)

The Fly.io platform doesn’t specifically create Postgres dump files themselves. The snapshots are instead at the level of Linux block devices (i.e., the same kind of thing as /dev/hda).

This is normal, actually. You’re supposed to leave that command running for as long as you need the tunnel. (Many people find that surprising.)

Hope this helps!

1 Like

A message in CLI = (tunnel connected) would do wonders to remove confusion. :slight_smile:

This is great. Will try this out. Creating a new db and taking that backup is a great idea. :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.