恢复数据库
我想恢复 PostgreSQL 中的数据库,但它不能。我已替换 bin 文件夹中的 pg_restore
但它仍然无法正常工作。消息是:
pg_restore: [archiver] unsupported version (1.12) in file header
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过将 postgresql 从 8.X 升级到 9.2.4 解决了这个问题。如果您在 Mac OS-X 上使用brew,请使用 -
完成此操作后,只需确保新的 postgres 安装位于路径的顶部即可。它看起来像这样(取决于版本安装路径)-
I solved this by upgrading postgresql from 8.X to 9.2.4. If you're using brew on Mac OS-X, use -
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) -
当创建存档的版本比您正在使用的 pg_restore 可以支持的版本更新时,就会发生这种情况。解决此问题的最佳方法是安装更新版本的 pg_restore。请注意,此限制最近已消失。例如,我可以对 9.2 自定义转储文件使用 9.1 中的 pg_restore。
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.