我有一个使用PostgreSQL数据库的OpenShift应用程序。
我想用‘活动’数据库中的数据恢复这个数据库。
当在本地运行时,我只是删除数据库。然后,我创建数据库,然后运行恢复。
但是,当我尝试在OpenShift上删除数据库时,它会说:
dropdb: database removal failed: ERROR: database "test" is being accessed by other users因此我停止了OpenShift应用程序,然后重试
现在它说:
pg_restore: [archiver (db)] connection to database "test" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/lib/openshift/123456ef0c1e123456789b/postgresql/socket//.s.PGSQL.5432"?所以我有个22号军规的情况。
在OpenShift上恢复PostgreSQL数据库的正确方法是什么?
发布于 2017-12-16 02:02:51
让Postgresql保持运行,但停止访问数据库的应用程序。就这么简单。
https://stackoverflow.com/questions/42299747
复制相似问题