在安装在 Windows 7 32 位操作系统上的 postgresql 9.1 中恢复 .gz 备份文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12293673/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
restoring .gz backup file in postgresql 9.1 installed on windows 7 32bit os
提问by Richard Huxton
I have a database backup file in .gz format.I need to restore it in postgresql 9.1 which is installed on windows 7 32bit os.The problem is postgresql does not support the backup file in gz format,so I cannot restore it.If anybody knows a solution please post your answer...
我有一个.gz格式的数据库备份文件。我需要在安装在windows 7 32位操作系统上的postgresql 9.1中恢复它。问题是postgresql不支持gz格式的备份文件,所以我无法恢复它。如果有人知道解决方案请发布您的答案...
回答by Richard Huxton
.gz isn't a backup format, it just means the file has been compressed with gzip. A copy of winzip or 7-zip should be able to decompress it. Then you'll either have a 'custom' format backup which can be restored with pg_restore or raw sql which can be run through psql.
.gz 不是备份格式,它只是表示文件已使用 gzip 压缩。winzip 或 7-zip 的副本应该能够解压缩它。然后你要么有一个“自定义”格式的备份,可以用 pg_restore 或原始 sql 恢复,可以通过 psql 运行。
You can also use pgadmin instead of the above tools. See the manuals for more details.
您也可以使用 pgadmin 代替上述工具。有关详细信息,请参阅手册。
http://www.postgresql.org/docs/current/static/reference-client.html
http://www.postgresql.org/docs/current/static/reference-client.html