1. Home
  2. MongoDB Tutorial
  3. MongoDB Copy Database

MongoDB Copy Database

copyDatabase() verifiably creates the goal databases if it doesn’t exist on the off chance that you don’t determine the hostname contention.

Syntax:

db.copyDatabase(fromdb, todb, fromhost, username, password, mechanism)

Example:

db.copyDatabase("FOSSTECHNIX","FOSSTECHNIX_COPY");

Here we have covered MongoDB Copy Database.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.