0

I have a set of @Tests running in my Spring Boot application that I want to run against a clone of my test Mongo(4.2) database (but against the same Mongo server - copyDatabase is not available).

My question is what is the easiest way to make an entire clone of a database and change its name (but keep it in the same actual mongo instance)? Basically, I'm looking for the equivalent of "cp myOrigMongoDB MyTestMongoDB" within the mongo cluster.

Thanks

gunygoogoo
  • 641
  • 2
  • 7
  • 19
  • 1
    Have you tried [mongodump](https://docs.mongodb.com/manual/reference/program/mongodump/) and [mongorestore](https://docs.mongodb.com/manual/reference/program/mongorestore/#bin.mongorestore) ? – André Adriano Nov 13 '18 at 14:04
  • I haven't found the right syntax that acts as a local "copy and rename" – gunygoogoo Nov 14 '18 at 16:03

0 Answers0