MongoDB Documentation, Release 3.0.4 Migrate a Sharded Cluster to Different Hardware (page 709) Migrate a sharded cluster to a different hardware sys- tem, for example, when moving a pre-production environment to production. Backup Cluster Metadata (page 712) Create a backup of a sharded cluster’s metadata while keeping the cluster op- erational. Configure Behavior of Balancer Process in Sharded Clusters (page 713) Manage the balancer’s behavior by scheduling a balancing window, changing size settings, or requiring replication before migration. Manage Sharded Cluster Balancer (page 715) View balancer status and manage balancer behavior. Remove Shards from an Existing Sharded Cluster (page 719) Migrate a single shard’s data and remove the shard. View Cluster Configuration List Databases with Sharding Enabled To list the databases that have sharding enabled, query the databases collection in the Config Database (page 737). A database has sharding enabled if the value of the partitioned field is true . Connect to a mongos instance with a mongo shell, and run the following operation to get a full list of databases with sharding enabled: use config db.databases.find( { "partitioned": true } ) Example You can use the following sequence of commands when to return a list of all databases in the cluster: use config db.databases.find() If this returns the following result set: { "_id" : "admin", "partitioned" : false , "primary" : "config" } { "_id" : "animals", "partitioned" : true , "primary" : "m0.example.net:30001" } { "_id" : "farms", "partitioned" : false , "primary" : "m1.example2.net:27017" } Then sharding is only enabled for the animals database. To list the current set of configured shards, use the listShards command, as follows: List Shards use admin db.runCommand( { listShards : 1 } ) View Cluster Details To view cluster details, issue db.printShardingStatus() or sh.status() . Both methods return the same output. Example In the following example output from sh.status() • sharding version displays the version number of the shard metadata. Chapter 10. Sharding 706