I would like to query the data that I need only from a server to another server, and I just use one line of command in linux shell mongoexport -h fromHost.com -d fromDB -c fromCollection -q ‘{ count: { $gte: 1 } }’ | mongoimport -h toHost.com -d toNewDB -c toNewCollection If your date is Continue reading “mongoexport and mongoimport with query from one host to one host”
Monthly Archives: May 2016
Fast way to find duplicate data in MongoDB
I need to find out the duplicate data content in my 40 Millions records, then I can make the unique index to my name field. > db.collecton.aggregate([ … { $group : {_id : “$field_name”, total : { $sum : 1 } } }, … { $match : { total : { $gte : 2 } Continue reading “Fast way to find duplicate data in MongoDB”
ERROR: failed to ptrace(PEEKDATA) pid 17402: Input/output error (5)
You may found this error from your php-fpm and the php-fpm crash tail /var/log/php-fpm/error.log [15-May-2016 12:24:13] ERROR: failed to ptrace(PEEKDATA) pid 17402: Input/output error (5) [15-May-2016 12:24:13] ERROR: failed to ptrace(PEEKDATA) pid 17777: Input/output error (5) [15-May-2016 12:24:13] ERROR: failed to ptrace(PEEKDATA) pid 18886: Input/output error (5) [15-May-2016 12:25:53] ERROR: failed to ptrace(PEEKDATA) pid 17232: Continue reading “ERROR: failed to ptrace(PEEKDATA) pid 17402: Input/output error (5)”
How to clear nginx cache manually ?
Normally I like to do manually job. assume that the default path of your nginx cache is /var/cache/nginx This will clear all your cache in one line. Delete a single file from nginx cache If you just want to delete a single file from nginx cache, you can try this. Then it will show something Continue reading “How to clear nginx cache manually ?”
