加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql:pg_restore: [archiver] input file does not appea

发布时间:2020-12-13 17:44:26 所属栏目:百科 来源:网络整理
导读:使用ps_restore恢复备份数据库出错: pg_restore: [archiver] input file does not appear to be a valid archive 使用 pg_dump -Fp -t mytable mytable_back 或 g_dump -t mytable mytable_back 备份出来的为脚本(纯文本)文件,不能直接使用pg_restore进行

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

使用
pg_dump -Fp -t mytable > mytable_back


g_dump -t mytable > mytable_back

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

需要使用命令psql i

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


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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读