Hello,
I’m having this error running mongodump:
mongodb@shards:~$ mongodump --port 27005 --db phoenix --collection audit_log --query ‘{ “_id”: { “$gt”: ObjectId(“5c2bcb014cf5143349ee0fd7”) }}’ --out /mnt/backup/mongodump/date +"%m-%d-%y"
--verbose
2022-05-27T12:34:16.590+0200 will listen for SIGTERM, SIGINT, and SIGKILL
2022-05-27T12:34:16.643+0200 Failed: error parsing query as Extended JSON: error decoding key _id: invalid JSON input. Position: 18. Character: O
mongodb@shards:~$ mongodump --port 27005 --db phoenix --collection audit_log --query ‘{ “_id”: { “$gt”: {“ObjectId”(“626ecf14679c0b146a8c8184”) }}}’ --out /mnt/backup/mongodump/date +"%m-%d-%y"
--verbose
2022-05-27T14:13:07.212+0200 will listen for SIGTERM, SIGINT, and SIGKILL
2022-05-27T14:13:07.216+0200 Failed: error parsing query as Extended JSON: error decoding key _id.$gt: invalid JSON input: missing colon after key “ObjectId”
My syntax is not correct?
Thanks in advance.
Regards