Search code examples
postgresqlpgadminpgadmin-4

PgAdmin for Mac instantly fails when restoring database exit code 1


Running PgAdmin 4.5 on Mac with Postgres 11, Importing it from PC with Postgres 13.

I'm trying to restore a database using a custom file (as recommended by the pgadmin docs) on a Mac, backed up on PgAdmin for windows. I've tried various different backup options. Data/no data, owner/no owner, every time I try to restore the database it instantly fails with exit code 1. Also have tried to import as a sql file. I've imported Database before with no issue from Windows to Windows, now when I try on Mac nothing seems to work. Any ideas would be much appreciated.


Solution

  • Take a text dump and restore from that. It is not guaranteed to be backwards compatible from 13 to 11, so you will probably need to edit a little bit. If you have problems, read the actual error message, not just the exit code.

    Doing this through pgAdmin is just going to add an extra layer of annoyances.

    Better yet, start using 13 rather than 11. Yes, the upgrade will probably take some work. But so will doing this without upgrading.