使用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)即可进行恢复

 

来自于:http://blog.csdn.net/tianzhu123/article/details/7666991

相关文章:

  • 2022-03-04
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2021-11-04
  • 2021-09-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-11-13
  • 2022-01-17
  • 2022-01-08
相关资源
相似解决方案