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

renameCollection command should say it can move collections

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • None
    • None
    • None
    • None

    Description

      After looking for a command in the docs on moving or copying a collection, the search didn't find anything because it didn't mention that you can move a collection between databases.

      db.runCommand( {renameCollection: "sourcedb.mycol", to: "targetdb.mycol"} )

      Attachments

        Activity

          People

            epc Ed Costello
            gianfranco Gianfranco Palumbo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 21 weeks, 1 day ago