Showing posts from April, 2021

Exploring MongoPush Using a Case of Filtering and Rename

One of the useful use cases of MongoPush  is  to copy a subset of a collection and rename the namespace in the target cluster. In this blog, I'll use a simple use case to describe its usage, the snapshot file, and tasks metadata of a migration .  If you are unfamiliar with MongoPush, see MongoPush - Push-Based MongoDB Atlas Migration Tool  for an introduction. Use Case The use case presented here is to copy a subset of a collection from a 2-shard MongoDB cluster to a replica set.  I use Keyhole to populate data into the vehicles collections. The requirements of this use case are: Locate all red vehicles, using filter {"color": "Red"} , from namespace atlanta.vehicles of the source cluster Copy the data to the cars collection under the austin database in the target replica set using the optional field to To satisfy the described requirements, use the command below: mongopush -push data -source ${source_uri} -target ${target_uri} \    -include '{"n