I took a backup of the Postgres database version 15, and now I want to restore that data to Postgres version 13.1.2? is it possible?
-
What command line did you use?jjanes– jjanes2023年09月19日 14:49:54 +00:00Commented Sep 19, 2023 at 14:49
1 Answer 1
It is not supported to downgrade PostgreSQL, no matter what.
The only way to success is the following cumbersome route:
Take a plain-format dump with
pg_dump -f dump.sql dbname
You need to use
pg_dump
from version 15 for thatTry to restore the dump to version 13 using
psql
. That will fail. Look at the error messages and editdump.sql
, manually changing the SQL syntax to avoid the error. Then try to restore again, and so on until all errors are gone.
I hope 13.1.2 is a typo, and you mean 13.12.
-
Thanks! Yes,
13.1.2
was indeed a typodatascinalyst– datascinalyst2023年09月21日 12:41:28 +00:00Commented Sep 21, 2023 at 12:41
Explore related questions
See similar questions with these tags.