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

Add an example to mongorestore to a different database name

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual, Server, tools
    • Labels:
      None

      Description

      Description

      A common workflow is to `mongodump` a production database, and then restore it to another logical database name (like 'db_dev') each morning to test on almost live data.

      I suggest we add a simple example for restoring to a different database name, perhaps restructuring the current "Change Collections’ Namespaces during Restore" section.

      It could be a new subsection "Change Database name during Restore" with an example like:

       mongorestore --nsInclude 'db_prd.*' --nsFrom 'db_prd.$coll$' --nsTo 'db_dev.$coll$'

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            nicholas.cottrell Nic Cottrell
            Participants:
            Last commenter:
            Kay Kim Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since reply:
              2 years, 30 weeks, 2 days ago