MongoDB – Mongorestore is not working as expected

A very good day

I have the user in the mongodb as below that has the privileges of superuser (I confirmed the role settings using show the users I send)

{
"_id": "admin.mongoadmin",
"user": "mongoadmin",
"db": "admin",
"roles": [
        {
            "role" : "readWrite",
            "db" : "admin"
        },
        {
            "role" : "root",
            "db" : "admin"
        }
    ],
"mechanisms": [
        "SCRAM-SHA-1",
        "SCRAM-SHA-256"
    ]
}

When I try to restore the oplog using the memory store, I get the error:

Error: restore error: error when applying oplog: applyOps: not authorized in the administrator to execute the command {applyOps:[{ts:Timestamp(15528283091)h:4632811839329880092v:2op:"c"ns:"admin$cmd"or:{create:"systemkeys"idIndex:{v:2key:{_id:1}name:"[{ts:Timestamp(15528283091)h:4632811839329880092v:2op:"c"ns:"admin$cmd"or:{create:"systemkeys"idIndex:{v:2key:{_id:1}name:"[{ts:Timestamp(15528283091)h:4632811839329880092v:2op:”c”ns:”admin$cmd”o:{create:”systemkeys”idIndex:{v:2clave:{_id:1}nombre:”[{ts:Timestamp(15528283091)h:4632811839329880092v:2op:”c”ns:”admin$cmd”o:{create:”systemkeys”idIndex:{v:2key:{_id:1}name:”I.D", ns:" admin.system.keys "}}, o2: {}}], $ db: "admin"}

mongorestore -u admin -p password --authenticationDatabase = admin --oplogFile 0000000000_0_oplog.bson --oplogReplay --oplogLimit = 1552828432 --dir = & # 39; / oplog / temp & # 39;
2019-03-17T13: 47: 36.945 + 0000 preparing collections to restore from
2019-03-17T13: 47: 36.945 + 0000 playing oplog
2019-03-17T13: 47: 36.962 + 0000 Error: restore error: error when applying oplog: applyOps: not authorized in admin to execute the command {applyOps: [ { ts: Timestamp(1552828309, 1), h: 4632811839329880092, v: 2, op: "c", ns: "admin.$cmd", o: { create: "system.keys", idIndex: { v: 2, key: { _id: 1 }, name: "_id_", ns: "admin.system.keys" } }, o2: {} } ], $ db: "admin"}

NOTE : I specified the oploglimit (–oplogLimit = 1552828432) with the last value I got from the bsondump
Is this correct? Or am I missing something?

(that is to say)

{"ts": {"$ timestamp": {"t": 1552828432, "i": 79}}, "t": {"$ numberLong": "1"}, "h": {"$ numberLong" : "- 2072015676601300967"}, "v": 2, "op": "i", "ns": "inventory.hari", "ui": {"$ binary": "avdlGH8AS1eBPXRytlO1Yg ==", "$ type ":" 04 "}," wall ": {" $ date ":" 2019-03-17T13: 13: 52.139Z "}," o ": {" _ id ":" 79 "," name ":" Hari "," role ":" Developer "," isEmployee ": true}}
{"ts": {"$ timestamp": {"t": 1552828432, "i": 80}}, "t": {"$ numberLong": "1"}, "h": {"$ numberLong" : "- 6279494628130059002"}, "v": 2, "op": "u", "ns": "inventory.hari", "ui": {"$ binary": "avdlGH8AS1eBPXRytlO1Yg ==," kind of $ ":" 04 "}," o2 ": {" _ id ":" 79 "}," wall ": {" $ date ":" 2019-03-17T13: 13: 52.139Z "}," o ": {"_id": "79", "name": "WD_Userjava.util.Random@9a7504c", "role": "Developer", "isEmployee": true}}

Any help is appreciated. Thanks in advance.