MongoDB Copy Database Use copyDatabsae() function to copy MongoDB database from remote database instance to local database instance. You can also use this to copy database in the local instance as alternatives for rename database. Syntax: db.copyDatabase(fromdb, todb, fromhost, username, password, mechanism) Examples: Copy Database on Same Instance You can create a duplicate database in same instance by using copyDatabase() function. db.copyDatabase(“olddb”,”newdb”) Output: { “ok” : 1 } Also you can use above option to rename database in MongoDB. But you must have enough space to create a copy of…
Read MoreTag: nosql
MongoDB Tutorial
This is our new series of tutorials for MongoDB NoSQL database. In this tutorial list you will find most of the basic tutorial about MongoDB which will help you to learn MongoDB and work with it.
Read More