小编use*_*363的帖子

恢复到现有 pg 数据库的更好方法

我们要恢复到现有的 9.3 pg 数据库。我们最终做的是:

1) delete the database and recreate again, 
2) use pg_restore to restore. 
3) reboot the ubuntu server to allow rails app to pick up the new database. 
Run Code Online (Sandbox Code Playgroud)

我们尝试了以下 pg_restore 命令,但它没有恢复到现有数据库:

$pg_restore --dbname=existing_database --verbose /home/myname/dbbackup.backup
Run Code Online (Sandbox Code Playgroud)

pg_restore 之后,existing_database 没有变化。是否有命令可以恢复到现有的 pg 数据库而无需像我们那样先删除它?我们必须使用命令行。非常感谢。

postgresql restore

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

postgresql ×1

restore ×1