terra-sync / cnc

Seamless Database Replication tool
GNU General Public License v3.0
4 stars 2 forks source link

db: postgres: Migrate `pg_dump` to `pg_dumpall` && `pg_restore` to `psql` #67

Closed charmitro closed 7 months ago

charmitro commented 7 months ago

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.

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.