首页 > 数据库技术 > 详细

postgresql:pg_restore: [archiver] input file does

时间:2015-03-24 13:14:27      阅读:1288      评论:0      收藏:0      [点我收藏+]

使用pg_restore恢复备份数据库出错:pg_restore: [archiver] input file does not appear to be a valid archive

使用
pg_dump -Fp -t mytable > mytable_back


pg_dump  -t mytable > mytable_back

备份出来的为脚本(纯文本)文件,不能直接使用pg_restore进行恢复

需要使用命令psql  和  \i

user>psql -U username -d mydb
mydb=# \i mytable_back


pg_dump和pg_restore的时候使用 格式为 custom(-F c )或tar格式(-F t)即可进行恢复

postgresql:pg_restore: [archiver] input file does

原文:http://my.oschina.net/u/877170/blog/390720

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!