Restore database
I want to restore a database in PostgreSQL but it can't. I have replaced pg_restore
in bin folder but it's still not working. The message is :
pg_restore: [archiver] unsupported version (1.12)开发者_运维问答 in file header
I solved this by upgrading postgresql from 8.X to 9.2.4. If you're using brew on Mac OS-X, use -
brew upgrade postgresql
Once this is done, just make sure your new postgres installation is at the top of your path. It'll look something like (depending on the version installation path) -
export PATH=/usr/local/Cellar/postgresql/9.2.4/bin:$PATH
This occurs when the archive was created with a version newer than the pg_restore you are using can support. The best way to fix this is to install a newer version of pg_restore. Note that this limitation has more recently gone away. I can use pg_restore from 9.1 against a 9.2 custom dump file for example.
精彩评论