Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10704

Add example for renaming a database to mongodump/mongorestore

      Please provide an example to rename a database with a pipe between mongodump and mongorestore.

      The use of --nsFrom "sourceDatabase.*" --nsTo "destDatabase.* to copy all collections from sourceDatabase and rename them to destDatabase is not that easy to see in mongorestore. The --db option cannot be used, as the restore comes from a pipe, not a file.

      Can an authoritative example on how to copy and rename a database with mongodump / mongorestore be added to:
      https://docs.mongodb.com/manual/reference/program/mongodump/#examples

            Assignee:
            Unassigned Unassigned
            Reporter:
            torsten.spindler@mongodb.com Torsten Spindler
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              1 year, 24 weeks, 3 days ago