Mongodump last 10 day data

I want to do backup of last 10 days data only based on my column LastModifiyDate in mongo.

mongodump --gzip --db=mongo-database --collection=Records --out=F:\backup\ --query ‘{LastModifyDate: {$gt: ISODate(‘2021-07-15T07:00:00.000Z’)}}’

Error Received:

Error: 2021-07-26T10:58:40.893-0700 positional arguments not allowed: [{$gt: ISODate(‘2021-07-15T07:00:00.000Z’)}}’]
2021-07-26T10:58:40.895-0700 try ‘mongodump --help’ for more information

Hello @NP_User, It is possible that you are not using proper syntax in specifying the query option. This following post has the solution for a similar question:

Also, see the example usage of query option in the documentation: