How to restore a dump flexibly
Restore a dump, not caring if the user matches nor if the exact point version of PostgreSQL matches.
pg_restore \
--format=custom \
--ignore-version \
--no-owner \
--no-privileges \
--verbose \
-U user -h myhost -d mydatabase \
/path/to/dump/file.dump