I am trying to migrate data from one Mongo instance to another using mongdump/restore. The dump is fine but the restore doesn’t like that I have colons in the database names:
error creating collection aaaa:bbbb.col: error running create command:
Database name {aaaa:bbbb} contains one or more invalid characters.
Unsupported Characters are {[/\\."$*<>:|?]}
I would have expected mongo to have refused to create the source databases if the colon is illegal. I also note that the docs place relatively few limits on the db name.
Is there anything I can do or will I have to write a script to do it the long way?
mongorestore version: 100.9.4 (same for dump)
git version: ce6af0fefca324ad5d9cb689d335130f48c99699
Go version: go1.20.12
os: linux
arch: amd64
compiler: gc