命令:
原文链接:https://www.f2er.com/postgresql/192031.htmlbin/pg_dump -b -o -Fc -Z 0 -p 5333 -U user template1 -f db.dump bin/pg_restore -c -h localhost -p 5333 -U user -d template1 db.dump
步骤如下:
>将新表添加到DB并进行转储
>删除新添加的表
>尝试使用转储文件进行恢复
>使用代码1恢复退出但仍然可以成功恢复表.
error in pg_restore:
pg_restore: [archiver (db)] could not execute query: err-1: table “test1” does not exist
Command was: DROP TABLE public.test1;
WARNING: errors ignored on restore: 2