postgresql:pg_restore: [archiver] input file does

使用pg_restore恢復備份數據庫出錯:pg_restore: [archiver] input file does not appear to be a valid archive
web

使用
pg_dump -Fp -t mytable > mytable_back
sql


數據庫

pg_dump  -t mytable > mytable_back
app

備份出來的爲腳本(純文本)文件,不能直接使用pg_restore進行恢復spa

須要使用命令psql  和  \i
rest

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


pg_dump和pg_restore的時候使用 格式爲 custom(-F c )或tar格式(-F t)便可進行恢復input

相關文章
相關標籤/搜索