Uploaded image for project: 'Percona Backup for MongoDB'
  1. Percona Backup for MongoDB
  2. PBM-646

Stop the balancer during backup to make sure it doesn't start running during restore

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • None
    • 1.5.0
    • None
    • None

    Description

      If the balancer state was enabled whilst a backup was made that will become the balancer state as soon as the config.settings collection is restored.

      The consistency of the data in the backup files isn't affected by the balancer running, but if the balancer runs whilst the data is refilling that is a matter that affects restore data consistency.

      A config server will typical be restored in a minute whereas a shard with a lot of data will take hours. The balancer thread running on the config server primary will act upon the chunk balance it observes in config.chunks and shard zoning settings. If there was an imbalance it will continue send moveChunk commands to donor and recipient pairs of shard. This won't be blocked by the point that pbm-agent is still re-inserting documents to the collection. If a chunk range is empty that isn't invalid, so the chunk can be moved to another shard.

      If the balancer was enabled run _configsvrBalancerStop on a configsvr server before beginning the backup and re-enable when finished.

      Attachments

        Activity

          People

            andrew.pogrebnoi Andrew Pogrebnoi
            akira.kurogane Akira Kurogane (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist