I have a mongo-database where existing entries never change but new entries are added every day. I have ~1000 dumps, each is the new data that was added on the corresponding day.
I.e. I have the following files:
/dump1/mydatabase/mycollection1.bson /dump1/mydatabase/mycollection1.metadata.json /dump1/mydatabase/mycollection2.bson /dump1/mydatabase/mycollection2.metadata.json ... /dump2/mydatabase/mycollection1.bson /dump2/mydatabase/mycollection1.metadata.json /dump2/mydatabase/mycollection2.bson /dump2/mydatabase/mycollection2.metadata.json ... ... ... /dump1000/mydatabase/mycollection1.bson /dump1000/mydatabase/mycollection1.metadata.json /dump1000/mydatabase/mycollection2.bson /dump1000/mydatabase/mycollection2.metadata.json
I would like to restore "mydatabase" containing all the collections. The content in each of the collections should be appended to the existing collections instead of overwriting them.
When I run
mongorestore /dump1 mongorestore /dump2 ...
will this append my data to the existing collections or overwrite them?