Hi Prasad,
Thanks for given solutions, was tried commands first one done but date and queryfile both some issue errors are given below please help on this any mistake about that
This one successful :
mongodump --db=test --collection=test --query=“{ "_id": { "$gte" : { "$oid": "5e58e938707edd40784daf83" } } }”
As per below command based on date all documents not write can you please help on this why documents not write properly.
- date wise:
D:\bin>mongodump --port 27019 --db pms --collection purchase --query “{"dt":{"$gte":{"$date":"2020-02-12T04:07:34Z"}}}” --out D:\backup_export\admin\admin
2020-03-03T16:19:00.483+0530 writing pms.purchase to
2020-03-03T16:19:00.527+0530 done dumping pms.purchase (0 documents)
I was tried as per you mentioned --queryFile below error getting can you please help on this
- queryFile wise:
mongodump --port 27019 --db pms --collection purchase --queryFile “{"_id":{"$gte":{"$oid":"5e461d06dba04739ea454892"}}}” --out D:\backup_export\admin\admin\ –gzip
2020-03-03T15:47:53.961+0530 Failed: error reading queryFile: open {“_id”:{“$gte”:{“$oid”:“5e461d06dba04739ea454892”}}}: The filename, directory name, or volume label syntax is incorrect.