Backup and Restore Sharded Clusters备份和恢复分片群集
The following tutorials describe backup and restoration for sharded clusters:以下教程介绍了分片集群的备份和恢复:
Tip
mongodump
and mongorestore
cannot be part of a backup strategy for 4.2+ sharded clusters that have sharded transactions in progress, as backups created with mongodump
do not maintain the atomicity guarantees of transactions across shards.mongodump
和mongorestore
不能作为4.2+正在进行分片事务的分片集群的备份策略的一部分,因为使用mongodumps
创建的备份不能维护跨分片事务原子性的保证。
For 4.2+ sharded clusters with in-progress sharded transactions, use one of the following coordinated backup and restore processes which do maintain the atomicity guarantees of transactions across shards:对于具有正在进行的分片事务的4.2多个分片集群,请使用以下协调的备份和恢复过程之一,这些过程确实维护了跨分片的事务的原子性保证:
Back Up a Sharded Cluster with File System Snapshots使用文件系统快照备份分片群集Use file system snapshots back up each component in the sharded cluster individually.使用文件系统快照分别备份分片集群中的每个组件。The procedure involves stopping the cluster balancer. If your system configuration allows file system backups, this might be more efficient than using MongoDB tools.该过程包括停止群集平衡器。如果您的系统配置允许文件系统备份,这可能比使用MongoDB工具更高效。Back Up a Sharded Cluster with Database Dumps使用数据库转储备份分片集群Create backups using使用mongodump
to back up each component in the cluster individually.mongodump
创建备份,以分别备份集群中的每个组件。Schedule Backup Window for Sharded Clusters为分片群集安排备份窗口Limit the operation of the cluster balancer to provide a window for regular backup operations.限制群集平衡器的操作,以便为常规备份操作提供一个窗口。Restore a Sharded Cluster恢复分片群集An outline of the procedure and consideration for restoring an entire sharded cluster from backup.概述从备份中恢复整个分片集群的过程和考虑事项。