By using pg_dumpall instead of pg_dump we ensure that ALL resources of the database are being exported in the backup file, which is now an SQL script instead of .dump due to the nature of pg_dumpall. This means that previous issues are now resolved, i.e.
Missing privileges
Missing roles
We also migated from pg_restore to the standard psql command, running it in the format of,
psql -h <address> -U <user> -p <port> -f <SQL script>
This, with the addition of pg_dumpall solves our major issue of being unable to run pg_restore on an already "restored" database.
By using
pg_dumpall
instead ofpg_dump
we ensure that ALL resources of the database are being exported in the backup file, which is now an SQL script instead of.dump
due to the nature ofpg_dumpall
. This means that previous issues are now resolved, i.e.We also migated from
pg_restore
to the standardpsql
command, running it in the format of,psql -h <address> -U <user> -p <port> -f <SQL script>
This, with the addition of
pg_dumpall
solves our major issue of being unable to runpg_restore
on an already "restored" database.