我已经进行了备份并pg_dumpall > test.out
成功生成了 test.out,因此备份已完成。
我已使用命令 psql -f test.out postgres进行恢复但在恢复备份时出现以下错误:
databases already exists
relation "products" already exists
duplicate key value violates unique constraint "products_pkey"
Run Code Online (Sandbox Code Playgroud)
我实际上想用备份替换现有数据库中的数据。怎么做?
postgresql ×1