Can't make `fly pg import` to work šŸ˜“

Hi… It’s not you; fly pg import doesn’t work with localhost, unfortunately.

(I made that same mistake myself, initially.)

The reason is that the main import job is done by a temporary machine that runs within the Fly.io internal network:

Most people end up instead using pg_dump locally, SFTPing the resulting file up to the server, and then SSHing in to restore from there.

Alternatively, you can try making a fly proxy tunnel on port 15432 and avoid the SFTP step, at the expense of potentially some network glitchiness (depending on how good your local ISP is).

(Fly Postgres generally expects you to be familiar with these kinds of steps; that’s part of what they mean by ā€œnot managedā€, :dragon:.)

(Hopefully, the upcoming Fly-managed Definitely Managed Postgres will come with very extensive importing instructions, since a lot of people are going to want to do that suddenly—I expect.)

1 Like