We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d394c4 commit ecb9f2cCopy full SHA for ecb9f2c
pbm/oplog/restore.go
@@ -327,6 +327,20 @@ func (o *OplogRestore) isOpExcluded(oe *Record) bool {
327
coll, _ = oe.Object[0].Value.(string)
328
return o.excludeNS.Has(db + "." + coll)
329
}
330
+ // handle renameCollection and convertToCapped commands.
331
+ // NOTE: convertToCapped is done by creating a temporary capped collection,
332
+ // inserting docs from the source collection to the collection,
333
+ // and renaming it to the source collection.
334
+ if cmd == "renameCollection" {
335
+ from, _ := oe.Object[0].Value.(string)
336
+ if o.excludeNS.Has(from) {
337
+ return true
338
+ }
339
+ to, _ := oe.Object[1].Value.(string)
340
+ if o.excludeNS.Has(to) {
341
342
343
344
345
return false
346
0 commit comments