[英]pg_restore: [archiver] unsupported version (1.13) in file header
C:\Program Files (x86)\pgAdmin III\1.22\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "randd" --role "postgres" --no-password --verbose "C:\Users\ranjeet\Desktop\RandDbackup19-3final.backup"
pg_restore: [archiver] 文件头中不受支持的版本 (1.13)
This error means that you are using an old and outdated version of pg_restore
(and hence PostgreSQL) on the client side.此错误意味着您在客户端使用旧的和过时的
pg_restore
(以及 PostgreSQL)版本。 The dump was created by a more recent release of PostgreSQL that the one installed, so your pg_restore
does not know how to handle it.转储是由安装的最新版本的 PostgreSQL 创建的,因此您的
pg_restore
不知道如何处理它。
Archive version 1.13 was introduced by commit 3d2aed664ee8271fd6c721ed0aa10168cda112ea in February 2018. It has been available since the point releases 10.3, 9.6.8, 9.5.12, 9.4.17 and 9.3.22.归档版本 1.13 是由 2018 年 2 月提交 3d2aed664ee8271fd6c721ed0aa10168cda112ea引入的。自 10.3、9.6.8、9.5.12、9.4.12 和 9.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3 版发布以来,它已经可用。
You should upgrade your PostgreSQL installation, particularly because this release and this patch contain security relevant bug fixes.你应该升级你的 PostgreSQL 安装,特别是因为这个版本和这个补丁包含安全相关的错误修复。
No need to upgrade to the latest Postgres version.无需升级到最新的 Postgres 版本。
We can backup and restore from any Postgres version to any as follows.我们可以按如下方式从任何 Postgres 版本备份和恢复到任何版本。
Create a backup in plain SQL format using pg_dump as follows in local/dev machine在本地/开发机器中使用 pg_dump 创建一个纯 SQL 格式的备份,如下所示
pg_dump -U postgres -W -F p test > test.sql
Then use psql to restore dump on remote machine然后使用 psql 在远程机器上恢复转储
psql -U postgres -W -d test -f test.sql
It works, on windows as well as Linux environments.它适用于 Windows 和 Linux 环境。
Please note if you see an error message while restoring on the remote machine like 'ERROR: unrecognized configuration parameter "default_table_access_method"'.请注意,如果您在远程计算机上恢复时看到错误消息,例如“错误:无法识别的配置参数“default_table_access_method””。 You can simply ignore this message, as "default_table_access_method" option is introduced in Postgres 12 and while taking backedup added in sql file.
您可以简单地忽略此消息,因为 Postgres 12 中引入了“default_table_access_method”选项,同时在 sql 文件中添加了备份。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.