I periodically take dump of the oplog collection and during restore I apply it using mongorestore utility.
If I have a view creation, which is captured by oplog backup and if I try to restore it, it fails with below error.
Please can someone help to resolve it and restore views.
root@tepalteubuntu1804:/home/admin# "/usr/bin/mongorestore" --port 27017 --oplogReplay "/local/oplog_replay_input" 2021-03-05T09:53:53.936+0000 preparing collections to restore from 2021-03-05T09:53:53.937+0000 replaying oplog 2021-03-05T09:53:53.940+0000 **Failed: restore error: error applying oplog: applyOps: (Location51070) Modifications to system.views must take an exclusive lock** 2021-03-05T09:53:53.940+0000 0 document(s) restored successfully. 0 document(s) failed to restore.