Duplicate keys error on restoring old dump to newer mongodb instance
Recently, I had to restore an old MongoDB dump (around version 2.4) from an old
meteorjs project into a mongodb instance v3.4.
While trying, I was greeted by an error telling me that there are duplicate keys in the dump and therefore cannot restore.
The solution to that seems to be the deletion of all the
.json files in the dump. Newer MongoDB versions seem to only need the
.bson files of the dump for restoring – and in trying to restore the JSON files aswell, they encounter duplicate keys and throw an error.