About a mongodb query

I want to backup data using a Mongodb query into Google Cloud Storage. The data to be backed up is obtained by filtering out a specific collection in a database based on its “createdDate” field which is in ISO format.
Can anyone tell me the query for the same?
(Note:- Prefer to use mongodump because I need the data in BSON for backup)

The option for mongodump to specify a query is –query.

There are a few examples in the link I provided.

If you are new to MongoDB and really do not know about making a query on a field I suggest you start with taking some courses from university.mongodb.com.

1 Like