How to take backup based on ISODate or ObjectID using mongodump v4.2.2?

If you want to select only the documents based on a filter criteria (like the restricting the documents based on a date field values), you can specify a filter with the option –query.