Mongodump export condition error

mongodump or mongoexport use-- query,but have not filter ed the result, it export s all data.
my condition is like this:

{"modifiedOn": ISODate ("2018-06-06T00:00:12.539+0000")}

and i change it < del > is < / del > to 1528244529
but when i use this:

mongodump -h 192.168.169.63:27017 -d product_operation_sold -c ebay_payment --query "{"modifiedOn":{$gt: Date(1528244529)}}" -o /root

what < del > was < / del > am I doing < del > my < / del > wrong?

Mar.18,2021

Try using $date instead of Date / ISODate when using with bash tools:

mongodump -h 192.168.169.63:27017 -d product_operation_sold -c ebay_payment --query '{"modifiedOn":{$gt: {$date: "2018-06-06T00:00:12.539Z"}}}' -o /root

This also applies to following tools:

  • mongodump
  • mongorestore
  • mongoimport
  • mongoexport
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5a108-44238.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5a108-44238.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?