Fails to load the dump as expected:
ubuntu@bionic:~$ mongorestore --oplogReplay dump/
2019-03-29T18:30:29.529+0000 preparing collections to restore from
2019-03-29T18:30:29.530+0000 reading metadata for test.foo from dump/test/foo.metadata.json
2019-03-29T18:30:29.543+0000 restoring test.foo from dump/test/foo.bson
2019-03-29T18:30:29.545+0000 restoring indexes for collection test.foo from metadata
2019-03-29T18:30:29.552+0000 finished restoring test.foo (1 document)
2019-03-29T18:30:29.552+0000 replaying oplog
2019-03-29T18:30:29.554+0000 Failed: restore error: error applying oplog: applyOps: applyOps had one or more errors applying ops
restore works just fine now:
ubuntu@bionic:~$ mongo --eval "db.foo.drop()"
MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.6.3
true
ubuntu@bionic:~$ mongorestore --oplogReplay dump/
2019-03-29T18:38:01.085+0000 preparing collections to restore from
2019-03-29T18:38:01.086+0000 reading metadata for test.foo from dump/test/foo.metadata.json
2019-03-29T18:38:01.108+0000 restoring test.foo from dump/test/foo.bson
2019-03-29T18:38:01.118+0000 restoring indexes for collection test.foo from metadata
2019-03-29T18:38:01.131+0000 finished restoring test.foo (1 document)
2019-03-29T18:38:01.131+0000 replaying oplog
2019-03-29T18:38:01.131+0000 done
bionic verification
First, reproducing the problem:
Using bionic's package: br.archive. ubuntu. com/ubuntu bionic/universe amd64 Packages
*** 1:3.6.3-0ubuntu1 500
500 http://
Fails to load the dump as expected: 29T18:30: 29.529+ 0000 preparing collections to restore from 29T18:30: 29.530+ 0000 reading metadata for test.foo from dump/test/ foo.metadata. json 29T18:30: 29.543+ 0000 restoring test.foo from dump/test/foo.bson 29T18:30: 29.545+ 0000 restoring indexes for collection test.foo from metadata 29T18:30: 29.552+ 0000 finished restoring test.foo (1 document) 29T18:30: 29.552+ 0000 replaying oplog 29T18:30: 29.554+ 0000 Failed: restore error: error applying oplog: applyOps: applyOps had one or more errors applying ops
ubuntu@bionic:~$ mongorestore --oplogReplay dump/
2019-03-
2019-03-
2019-03-
2019-03-
2019-03-
2019-03-
2019-03-
Updating: br.archive. ubuntu. com/ubuntu bionic- proposed/ universe amd64 Packages
Version table:
*** 1:3.6.3-0ubuntu1.1 500
500 http://
restore works just fine now: //127.0. 0.1:27017 29T18:38: 01.085+ 0000 preparing collections to restore from 29T18:38: 01.086+ 0000 reading metadata for test.foo from dump/test/ foo.metadata. json 29T18:38: 01.108+ 0000 restoring test.foo from dump/test/foo.bson 29T18:38: 01.118+ 0000 restoring indexes for collection test.foo from metadata 29T18:38: 01.131+ 0000 finished restoring test.foo (1 document) 29T18:38: 01.131+ 0000 replaying oplog 29T18:38: 01.131+ 0000 done
ubuntu@bionic:~$ mongo --eval "db.foo.drop()"
MongoDB shell version v3.6.3
connecting to: mongodb:
MongoDB server version: 3.6.3
true
ubuntu@bionic:~$ mongorestore --oplogReplay dump/
2019-03-
2019-03-
2019-03-
2019-03-
2019-03-
2019-03-
2019-03-
bionic verification succeeded.