发布于 2015-09-14 14:48:21 | 164 次阅读 | 评论: 0 | 来源: 网络整理

Overview

In a sharded cluster, the balancer process is responsible for distributing sharded data around the cluster, so that each shard has roughly the same amount of data.

However, when creating backups from a sharded cluster it’s important that you disable the balancer while taking backups to ensure that no chunk migrations affect the content of the backup captured by the backup procedure. Using the procedure outlined in the section Disable the Balancer you can stop the balancer process temporarily using a manual process. As an alternative you can use this procedure to define a balancing window so that the balancer is always during your automated backup operation.

Procedure

If you have an automated backup schedule, you can disable all balancing operations for a period of time. For instance, consider the following command:

use config
db.settings.update( { _id : "balancer" }, { $set : { activeWindow : { start : "6:00", stop : "23:00" } } }, true )

This operation configures the balancer to run between 6:00 am and 11:00pm, server time. Schedule your backup operation to run and complete in this time. Ensure that the backup can complete during the window when the balancer is running and that the balancer can effectively balance the collection among the shards in the window allotted to each.

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务