Last active
October 31, 2016 08:29
-
-
Save cig0/647ea36211977d00a534 to your computer and use it in GitHub Desktop.
Migrating collections from a mongoDB 2.6 mmap database to Percona Server for mongoDB 3.0.8 wiredTiger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixex the error 'Failed: restore error: listDB.lists: error creating collection \ | |
# listDB.lists: error running create command: exception: specify size: when capped is true' | |
# | |
# Credits: Juan Pablo Nogueira, https://ar.linkedin.com/in/juan-pablo-nogueira-30645514/en | |
grep -rl ', "capped" : { "$undefined" : true }, "size" : { "$undefined" : true }' \ | |
/path/to/DB/to/be/restored/* | xargs sed -i 's/, "capped" : { "$undefined" : true }, \ | |
"size" : { "$undefined" : true }//g' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment