[00:09:23] <atbe> Wow, weird, all my actual db files got stored in /var/lib/mongodb
[00:09:44] <atbe> It just kind of ignored the --dbpath command?
[00:10:31] <GothAlice> You can't normally run two copies at the same time, without additional options. I'm doubting the command you gave successfully ran.
[00:11:21] <atbe> My intention was not to run two copies, I simply wanted the db directed to a specific folder. But regardless I found it so that's less of an issue than before.
[00:11:41] <atbe> One last question, what is the safest method of moving a mongodb database from one machine to another?
[00:12:19] <GothAlice> Your system-level initialization scripts are passing their own configuration and command-line. You can see them by: sudo cat /proc/`pidof mongod`/cmdline (null separated, so you'll see no spaces between arguments…)
[00:12:43] <GothAlice> Aye, mongodump is the way to extract data, but you can also just copy the on-disk files.
[00:13:32] <GothAlice> i.e. rsync /var/lib/mongodb with the mongod service shut down? Perfectly good, if you can afford the downtime, or know how to set up filesystem snapshotting to avoid that, or just use mongodump. ;P
[00:13:50] <atbe> Okay cool, I was hoping I could just copy the files. But now I am confused on what to copy. I thought everything was going to be inside the /data/db folder I created but now I have data in /var/lib/mongodb and I also have data in the $dir/data/db path as well. Will I need to copy both?
[00:14:55] <atbe> So I don't necessarily need the files from the screenshot above?
[00:22:06] <GothAlice> Is it around the right size?
[00:22:34] <GothAlice> The ./data/db folder likely contains nothing real, but after shutting down the system-level service, you can check by re-running the command you tried earlier.
[00:25:02] <atbe> Okay, sounds good. Yes it is the right size.
[00:26:07] <GothAlice> atbe: (Or by re-running your previous command, and specifying an alternate port at the same time.)
[00:26:33] <atbe> Right, I will see how it goes when I'm ready to migrate
[01:12:22] <Skullclown> hi, given a document that contains two lists (one with names and one with values), how can I loop over the names list and return only those for which values[position of name in name list] > 10 ?
[03:23:38] <j4f-shredder> I've created a reference using the objectId of another collection, I'm creating a seed file to generate mock data, how do I create the new object using the reference to the object id of the other collection manually??? the campaign_id is the reference....{ campaign_id: {type: mongoose.Schema.Types.ObjectId, ref: 'Campaign'}, contributed: {type: Number, required: true}, contribution_date :{ type: D
[03:23:54] <j4f-shredder> so the creation of the object
[07:30:30] <YokoBR> KekSi: yep, but the problem was that i first needed to convert the string to a mongodb id object
[07:34:40] <KekSi> don't you have a viewer or something? even the "mongo" shell -- the _id is set as an ObjectId("timetamp")
[08:22:33] <qswz> Is there a way to remove a field?
[08:39:58] <qswz> hmm Can you mix an$unset with a $set? oh guess so
[09:36:26] <kalem> I have a mongodb 3.2 cluster with 3 nodes. There's a primary node with two secondary nodes. Is it a good idea to use always primary node for mongodump or is better to use one of the two secondary nodes?
[11:11:07] <whirlibulf> I have auth users defined on my cluster, and I can auth on configs and routers, but if I try on a shard it can't find the user
[11:11:12] <whirlibulf> does anybody know what's going on here?
[11:20:15] <whirlibulf> well actually I don't know if it can or can't find the user, but it says authentication failed
[11:20:29] <whirlibulf> the user I am using has root role
[11:28:08] <whirlibulf> never mind, I figured it out. shards don't share users with the rest of the cluster and I had to create a new user on the shard
[11:40:48] <kerunaru> Hi, there! I have an aggregate query using mongodb php library 1.0.3 which returns results on php 5.6.19 but nothing on php 7.0.8 both with mongodb driver 1.1.9. I run out of ideas about what is going on, maybe you would give me some light about what the solution to my problem is =(
[11:41:52] <Derick> kerunaru: there should not be any difference
[11:42:03] <Derick> can you reproduce this on the command line?
[12:10:43] <qswz> https://jira.mongodb.org/browse/SERVER-26961 do you agree?
[12:11:59] <qswz> since undefined type is deprecated in BSON I think?
[12:18:22] <Derick> qswz: I don't think drivers implement undefined
[12:19:21] <Derick> and all APIs/types that the shell does, need to be able to be represented in drivers. As "undefined" is not something every language has, and creating a "\MongoDB\BSON\Undefined" types seems useless, I doubt this will get changed.
[12:20:40] <Derick> going forwards, yes, they should be similar
[12:20:57] <Derick> As author of the PHP drivers, we haven't had a "undefined" type since I started working on it 5 years ago
[12:27:01] <Derick> qswz: in https://jira.mongodb.org/browse/SERVER-26961, the undefined in "db.foo.updateOne({i:1}, {$set:{foo:7}, $unset:{bar:undefined}})" does nothing btw, you can specify any value and it would do the same
[15:50:24] <nikitosiusis> is anyone using rocksdb with mongo? I wonder about compression_per_level directive. Does is compress LMax by default? in config I see only about level2 http://pastebin.com/g8XMsQgb
[15:56:17] <cpama> I have a scenario where I have to update 2 databases when a user creates a new 'widget' lets say... one database is mongo and the other is a redis database on a remote server. is there any easy way to "rollback" my mongo upsert if the remote server says the redis insert failed?
[16:14:32] <cheeser> cpama: use findAndModify to return the old state of the document before the update. upon a redis failure, write that old version back to the database.
[16:21:58] <cpama> hm cheeser i guess that's one way to handle it for sure...
[18:29:37] <dsfsdfsdfs_> hey there. can so answer a few question about certificates in mongoDB?
[19:10:24] <Toonsev> Hey guys, I am designing a lobby system: each lobby doc has the fields "players" (num), "maxplayers" (num) and "joinable" (bool), I would like to atomically increment the "players" number, only if the players are currently less then the "maxplayers", then if the "maxplayers" equal the "players", the joinable should be atomically set to false within that same update. Is this possible?
[19:10:54] <Toonsev> the last part is the thing I'm unsure about (a condition within the updateOperations)
[19:20:01] <Toonsev> I'll do it in a fetch->update manner, except if someone has a recommendation.
[19:29:20] <teprrr> mm. it's probably not possible two have two hosts acting as primaries at the same time?
[19:30:14] <teprrr> I have two machines in different place. the second one fetches some data produced by the first one, and produces then some new himself
[19:31:14] <teprrr> although I could just extract the info out, and send to the second host doing whatever it needs to do. it's not necessary to have that new info available for the first one
[19:31:27] <teprrr> was just thinking that it'd be nice to have some redundancy there
[19:34:33] <FrancescoV> Hi all. I'm pretty new to python & mongodb. I'm wondering how you convert a mongodb document into an instance of your own class? I want to centralise the code but I don't know where I should place it. Any advice or tips?
[19:42:20] <Toonsev> @FrancescoV: Take a look at morphia
[19:42:41] <FrancescoV> Toonsev, thanks, I'll check it out
[19:44:41] <FrancescoV> Toonsev, Isn't this only for java? I'm looking for a python solution
[23:33:41] <blizzow> Hey mongo marketers, stop sending propaganda that says 3.4 is out. At least say it's upcoming, or soon to be released. Pointy Haired Bosses don't understand why we're not on the latest version right effing now.