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â
}
],
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