Mongodbrestore failing with latest toosl version 100.6.1

mongorestore --authenticationDatabase admin --port 27017 -u admin --oplogReplay /tmp/new/logs_0/20230208015236_20230208015524/local/oplog.rs.bson --oplogLimit 1675821494:0 -p
2023-02-08T07:29:32.814+0000 checking for collection data in /tmp/new/logs_0/20230208015236_20230208015524/local/oplog.rs.bson
2023-02-08T07:29:32.814+0000 replaying oplog
2023-02-08T07:29:32.815+0000 Failed: restore error: error applying oplog: applyOps: (Unauthorized) not authorized on admin to execute command { applyOps: [ { ts: Timestamp(1675821194, 1), t: 1, h: null, v: 2, op: “c”, ns: “config.$cmd”, o: { create: “system.sessions”, idIndex: { v: 2, key: { _id: 1 }, name: “id” } } } ], lsid: { id: UUID(“1da48df1-7268-4bf2-a1bb-6455005d68f3”) }, $clusterTime: { clusterTime: Timestamp(1675841367, 2), signature: { hash: BinData(0, 23BDCA774453874BA680500BE149D0764CC5811C), keyId: 7197629778025775108 } }, $db: “admin”, $readPreference: { mode: “primaryPreferred” } }

I am running using ‘root’ role user.855WB43P44:PRIMARY> show users
{
“_id” : “admin.admin”,
“userId” : UUID(“cc00c914-0020-47f4-8ca4-d1e0fe11f227”),
“user” : “admin”,
“db” : “admin”,
“roles” : [
{
“role” : “root”,
“db” : “admin”
}
],

Hi @Balram_Parmar

I’m guessing this is the same question you posted in Mongorestore using OplogReplay - #7 by Balram_Parmar so I’ll close this one and continue on that topic instead.

Thanks
Kevin

1 Like