C:\Users\gregor\Downloads\mongo\bin>mongod.exe --dbpath \data\a --replSet rs1 Wed May 30 12:03:20 [initandlisten] MongoDB starting : pid=876 port=27017 dbpath =\data\a 64-bit host=gregor-PC Wed May 30 12:03:20 [initandlisten] db version v2.0.4, pdfile version 4.5 Wed May 30 12:03:20 [initandlisten] git version: 329f3c47fe8136c03392c8f0e548506 cb21f8ebf Wed May 30 12:03:20 [initandlisten] build info: windows sys.getwindowsversion(ma jor=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB _VERSION=1_42 Wed May 30 12:03:20 [initandlisten] options: { dbpath: "\data\a", replSet: "rs1" } Wed May 30 12:03:20 [initandlisten] journal dir=/data/a/journal Wed May 30 12:03:20 [initandlisten] recover : no journal files present, no recov ery needed Wed May 30 12:03:20 [initandlisten] waiting for connections on port 27017 Wed May 30 12:03:20 [websvr] admin web console waiting for connections on port 2 8017 PRIMARY> rs.status() { "set" : "rs1", "date" : ISODate("2012-05-30T10:33:12Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "gregor-PC:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "optime" : { "t" : 1338373682000, "i" : 1 }, "optimeDate" : ISODate("2012-05-30T10:28:02Z"), "self" : true }, { "_id" : 1, "name" : "gregor-PC:27018", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 310, "optime" : { "t" : 1338373682000, "i" : 1 }, "optimeDate" : ISODate("2012-05-30T10:28:02Z"), "lastHeartbeat" : ISODate("2012-05-30T10:33:12Z"), "pingMs" : 0 } ], "ok" : 1 } PRIMARY> C:\Users\gregor\Downloads\mongo\bin>mongoimport.exe -d test -c training F:\impor t\data\twitter.json connected to: 127.0.0.1 9255946/92443914 10% 5400 1800/second 20906466/92443914 22% 12100 2016/second 32290463/92443914 34% 18700 2077/second 43521655/92443914 47% 25200 2100/second 54691073/92443914 59% 31700 2113/second 64300077/92443914 69% 37300 2072/second 75151162/92443914 81% 43600 2076/second 86136698/92443914 93% 50000 2083/second imported 53641 objects C:\Users\gregor\Downloads\mongo\bin>mongo.exe MongoDB shell version: 2.0.4 connecting to: test PRIMARY> use test switched to db test PRIMARY> db.training.count() 53641 PRIMARY> C:\Users\gregor\Downloads\mongo\bin>mongo.exe MongoDB shell version: 2.0.4 connecting to: test PRIMARY> rs.status() { "set" : "rs1", "date" : ISODate("2012-05-30T10:57:28Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "gregor-PC:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "optime" : { "t" : 1338374130000, "i" : 1556 }, "optimeDate" : ISODate("2012-05-30T10:35:30Z"), "self" : true }, { "_id" : 1, "name" : "gregor-PC:27018", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 1766, "optime" : { "t" : 1338374130000, "i" : 1556 }, "optimeDate" : ISODate("2012-05-30T10:35:30Z"), "lastHeartbeat" : ISODate("2012-05-30T10:57:27Z"), "pingMs" : 0 } ], "ok" : 1 } PRIMARY> C:\Users\gregor\Downloads\mongo\bin>mongodump.exe --host "gregor-PC:27018" connected to: gregor-PC:27018 all dbs DATABASE: test to dump/test test.training to dump/test/training.bson 53641 objects test.system.indexes to dump/test/system.indexes.bson 1 objects DATABASE: * to dump/* error: boost::filesystem::create_directory: The filename, directory name, or vol ume label syntax is incorrect: "dump\*" C:\Users\gregor\Downloads\mongo\bin>mongorestore.exe --drop dump connected to: 127.0.0.1 Wed May 30 12:00:32 dump/test/training.bson Wed May 30 12:00:32 going into namespace [test.training] Wed May 30 12:00:32 dropping 17876723/85711256 20% 42360372/85711256 49% 65503027/85711256 76% 53641 objects found Wed May 30 12:00:43 dump/test/system.indexes.bson Wed May 30 12:00:43 going into namespace [test.system.indexes] Wed May 30 12:00:43 dropping Wed May 30 12:00:43 { key: { _id: 1 }, ns: "test.training", name: "_id_" } 1 objects found C:\Users\gregor\Downloads\mongo\bin>mongo.exe MongoDB shell version: 2.0.4 connecting to: test PRIMARY> rs.status() { "set" : "rs1", "date" : ISODate("2012-05-30T11:01:05Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "gregor-PC:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "optime" : { "t" : 1338375643000, "i" : 2552 }, "optimeDate" : ISODate("2012-05-30T11:00:43Z"), "self" : true }, { "_id" : 1, "name" : "gregor-PC:27018", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 1983, "optime" : { "t" : 1338375643000, "i" : 2552 }, "optimeDate" : ISODate("2012-05-30T11:00:43Z"), "lastHeartbeat" : ISODate("2012-05-30T11:01:03Z"), "pingMs" : 0 } ], "ok" : 1 } PRIMARY>