Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Backup

We backup each table to a separate dump file, using the command:-

Code Block
languagebash
titleSyntaxBackup command
pg_dump.exe –Fc –table=<tablename> --username=postgres –file=<filename>

...

Code Block
languagebash
titleSyntaxRestore command
pg_restore.exe –dbname=<database> --exit-on-error –username=postgres <filename>

...

Only when all tables have been successfully restored do we then go through and remove the backups.

Database

Each table is restored into the same database name that it came from, and this is ‘remembered’ in the control file.