We need to migrate our existing database server (PG 12) to a new server. I followed this [https://www.postgresql.org/docs/8.1/app-pg-dumpall.html] article and created the dump as
pg_dumpall > alldb.sql
then copied the file alldb.sql
to the new system and tried to restore using
psql -f alldb.sql postgres
and it failed with the following error messages
psql:allbackup.sql:314: ERROR: option "locale" not recognized LINE 1: ...3103" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = '... ^ psql:allbackup.sql:317: ERROR: database "XXXXX" does not exist psql:allbackup.sql:319: error: \connect: FATAL: database "XXXXX" does not exist
What could be the issue?
- Ubuntu 20.04
- Postgres version 12