Mongosync 会将数据从一个集群复制并写入到另一个集群,直到同步完成。您可以使用此工具在MongoDB集群之间执行一次性数据迁移,同时最短停机时间。
有关执行期间的 mongosync 和目标集群行为的更多信息,请参阅中间同步注意事项。
注意
mongosync 仅兼容MongoDB主要版本,不支持快速版本和次要版本。
要了解有关 mongosync 与 MongoDB 版本兼容性的详情,请参阅 MongoDB Server 兼容性。
您可以使用 mongosync 实用程序启用集群同步。有关 mongosync进程的概述,请参阅关于 mongosync。
重要
在您对 commit 调用 mongosync 且 canWrite 成功返回 true 之前,目标集群上的已迁移集合不能用于接受应用程序读取或写入流量。请勿使用 mongosync 维护用于灾难恢复、分析或其他类似使用案例的从节点(secondary node from replica set)集群。
To get started with mongosync, refer to the Quick Start Guide. For more detailed information, refer to the Installation or Connecting mongosync page that best fits your situation. See also the mongosync Migration Limitations page for important restrictions and the mongosync Behavior page for behavior information.
Frequently Asked Questions (FAQ)(常见问题解答 (FAQ))页面解答了用户提出的有关 mongosync 的问题。