【问题标题】:mongodb replica choose operation to syncmongodb副本选择要同步的操作
【发布时间】:2021-01-05 11:34:14
【问题描述】:

我开始在副本模式下使用 mongodb。 有没有办法选择我想从主同步到辅助的哪种操作?

For example if i want to perform ONLY insert from primary to secondary BUT DON'T WANT TO performe the delete actions is it possible?

谢谢!!!

【问题讨论】:

    标签: mongodb mongodb-replica-set


    【解决方案1】:

    副本集节点之间的同步由 MongoDB 执行。作为数据库的用户,您无法选择同步哪些操作 - 它们都可以。

    【讨论】:

      【解决方案2】:

      不在副本集中!但是,您可以让 MongoDB 实例“跟踪”您的主要 MongoDB 服务器 OpLog 并插入到该实例中。检查here.

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-08-17
        • 1970-01-01
        • 1970-01-01
        • 2021-08-31
        相关资源
        最近更新 更多