
NoSQL
oraclemch
这个作者很懒,什么都没留下…
展开
-
mongodb数据库的备份与恢复!
在mongodb的官方上search mongodump没有相应的资料,自己就在shell命令行里面 :/data/mongodb-linux-x86_64-1.6.0/bin/mongodump --help 了一把, 自己来测试了,测试总结如下:备份本机mongodb到/tmp/bakup目录下面:<br />[root@localhost csf]# /data/mongodb-linux-x86_64-1.6.0/bin/mongodump -h 192.168.0.39:10001 -d csf原创 2010-08-31 16:18:00 · 4255 阅读 · 0 评论 -
mongodb数据库一个特定判断属性必须存在的查询
-- 查询x、b属性必须存在,attr字段=3的记录。> db.c1.save({x:null})> db.c1.save({b:2})> db.c1.save({b:2, x:111})<br />> db.c1.save({b:2, x:111, attr:3})--<br />> db.c1.find({x:{'$exists':true},b:{'$exists':true}, attr:3});{ "_id" : ObjectId("4c7f1ed1ad1da0b78ea376a4"), "b"原创 2010-09-02 14:09:00 · 10107 阅读 · 0 评论