简体   繁体   中英

Upgrading from postgresql 9 to 11

I'm using a Linux server, I want to upgrade postgresql from the version 9 to 11. I have created a dump of my database. Then I have installed postgresql 11, now I want to import the dump to postgresql 11, I run the command

pg_restore -h localhost -d dbLitstUsers -U postgres .dataBasebackup but get the error

pg_restore: [archiver] unsupported version (1.14) in file header

How can I fix this error ?

You must have used a pg_dump from v12 or higher. That generates a custom dump in a format (1.14) which is not compatible with older pg_restore. Retake the dump with the pg_dump coming with the version you want to restore to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM