Ran into an issue where I needed to access a Postgres backup today. To my dismay I realized it was compressed and could only be accessed by importing it into a Postgres database. After fumbleing around for about 20 minutes setting one up, I decided I never wanted to do it again.
Put this in your PATH
and use it (pg_quick_recover backup.sql.db
) to quickly spin
up a database with Docker, import the backup file, open up a shell to the databse, and then
close it all up and clean up Docker whhen you are done.
If you are trying to recover data, one easy way is by setting the output format to CSV.
\pset format csv