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

Add example for renaming a database to mongodump/mongorestore

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Needs Triage
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.4.7
    • Fix Version/s: None
    • Component/s: tools
    • # Replies:
      1
    • Last comment by Customer:
      true

      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

            Assignee:
            Unassigned
            Reporter:
            torsten.spindler Torsten Spindler
            Participants:
            Last commenter:
            Jonathan Dahl
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Days since reply:
              3 years, 5 weeks, 3 days ago