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

Add example for renaming a database to mongodump/mongorestore

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              1 year, 14 weeks, 2 days ago