Renaming DATABASE without dump/restore
Hello,
after a discussion with a MongoDB architect during a consulting day, the rename of a database was possible in previous version of MongoDB but now, it's impossible without a dump / restore process.
We don't want use a dump/restore process to rename a database because it's use a lot of time.
Could you tell me why this feature was deleted ? and will it be possible in a future MongoDb version ?
thanks.
regards,
David.
-
AdminBrian (Admin, MongoDB) commented
Hi David,
I am guessing you are referring to the copydb command, which got removed with version 4.2. If you are finding dump / restore slow, perhaps take a look at mtransfer, a new experimental tool added to mtools - https://github.com/rueckstiess/mtools You will still need to copy and export/import the data. mtransfer does have its limitations as it was built for some specific use cases, but if you do try it out would appreciate any feedback you might have.
-Brian
-
Martin commented
is this command still supported in Atlas GCP 3.6.22?
db.adminCommand( { renameCollection: 'unwired_prod.ArchiveStations', to: 'unwired_qa.ArchiveStations' } )