[15:02:21] <LuxuryMode> Having trouble using mongoexport. I am running `mongoexport --uri="mongodb://mymongo.host.here" --collection=foo out=bar.json` and running into this error: `error parsing command line options: error parsing positional arguments: provide only one MongoDB connection string. Connection strings must begin with mongodb:// or mongodb+srv:// schemes`. What am I doing wrong here?
[15:05:26] <d4rkp1r4t3> 1. should be --out= not out= 2. if you have authentication enabled make sure to add the authentication database in the uri
[15:06:48] <LuxuryMode> Doh! Good eye. Thanks d4rkp1r4t3
[15:07:11] <d4rkp1r4t3> yup np. may also need to include :27017 in the uri but it might default to that.. not sure
[15:07:42] <LuxuryMode> Right, thanks. On to the next error :) `could not connect to server: connection() : auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.`
[15:09:00] <LuxuryMode> Could simply be because I did not include username/pass. Thought it would prompt if ommitted.
[15:31:26] <d4rkp1r4t3> https://docs.mongodb.com/v4.2/reference/program/mongoexport/#cmdoption-mongoexport-password -- "You cannot specify both --password and --uri." So looks like you will need to use --host --authenticationDatabase --username to have it prompt for the password. otherwise you can include the username:password in the uri
[18:05:06] <jiffe> if I wanted a unique identifier per document that I wanted to appear random, would it be better to use an indexed uuid or an encrypted object id?
[18:37:24] <d4rkp1r4t3> jiffe: why not just use the _id field? its auto generated if you don't set it and "appears" random. if you don't like how the auto generated _id "appears" then setting it to a uuid would be good or maybe some hash. if your goal is to simply obfuscate the field, I would probably not use encryption for that