简体   繁体   English

将mongo实例与远程副本集同步

[英]Syncing mongo instance with a remote replica set

Production mongodb replicaset is running on "heroku". 生产mongodb copyset在“ heroku”上运行。 Working on a staging setup on AWS for testing purpose. 在AWS上进行登台设置以进行测试。 How can I sync my new mongodb instance on AWS with the heroku mongo replicaset data. 如何在AWS上将新的mongodb实例与heroku mongo副本集数据同步。

I don't want to add AWS mongo instance to production replicaset as any data write on staging will effect production environment. 我不想将AWS mongo实例添加到生产副本集,因为任何在暂存阶段写入的数据都会影响生产环境。

Any pointers in this direction is greatly needed. 非常需要这个方向的任何指针。 Thanks in advance. 提前致谢。

If you are intending to sync your staging database once, you can create dump of production server and restore on staging server. 如果打算一次同步登台数据库,则可以创建生产服务器转储并在登台服务器上还原。

See documentation of mongodump and mongorestore 请参阅mongodumpmongorestore的文档

However, if you trying to keep your staging server in sync with production on continues base without being member of replica set, unfortunately, it's not supported yet. 但是,如果您尝试在不作为副本集成员的情况下继续使登台服务器与生产保持同步,那么很遗憾,尚不支持该服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM