I want to create a .dump file from a Postgres .sql file I have locally. I don't want to connect to the database to do so, I just have a local file (or remote, wouldn't really matter), that I want to convert from .sql to .dump (so I can then upload to Heroku with PG backups).
From what I've seen and read you must connect to the database in order to create a dump. Is it possible to convert a .sql file > .dump file without connecting to it?
Something like pg_dump -f '/my/local/path.sql' > 'my-output-file.dump' ?
mv foo.sql foo.dump
?