fly pg import questions

@shacker

The fly fly command is designed to import data from a remote PostgreSQL database, not from a local dump file. That’s why it’s expecting a DSN (Data Source Name) instead of a local file path.

To import your local dump file into the Fly database, you can follow these steps:

  1. First, restore the dump file to a local PostgreSQL instance. You can use the pg_restore command for this:

    pg_restore -U your_local_username -d your_local_database /local/path/file.dump
    
  2. Once the data is restored to your local PostgreSQL instance, you can use the fly pg import command to import the data from your local instance to the Fly database. You’ll need to provide the DSN for your local PostgreSQL instance:

    fly pg import postgres://your_local_username:your_local_password@localhost:5432/your_local_database --app myapp-shacker-db
    

More info: