美文网首页开源
Postgresql数据迁移

Postgresql数据迁移

作者: questionuncle | 来源:发表于2018-12-20 17:12 被阅读86次

最近作者在部署道路渠化Demo,公司的发布环境全面切换到Rancher下,遇到的第二个问题就是怎么把我电脑上的数据迁移到新部署的环境上去。
就一个语句:

pg_dump -t wuxi3857split test | psql -h *.*.*.* -p 5432 -U postgres -d test
pg_dump -h *.*.*.* -U postgres -p 5432 -t wuxi3857split test | psql -h 127.0.0.1 -p 5432 -U postgres -d test

将本地test数据库里的wuxi3857split表,迁移到...:5432 test下,方便快捷,在此纪录以防忘记。

相关文章

网友评论

    本文标题:Postgresql数据迁移

    本文链接:https://www.haomeiwen.com/subject/sdfukqtx.html