Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-110

help for copy database

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Add a helper for copying a database. Following the code I use to implement it to mongokit :

      + def copy_database(self, from_db, to_db, from_host=""):
      + command = [ ('copydb',1), ('fromdb',from_db), ('todb', to_db)]
      + if from_host:
      + command.append( ('fromhost',from_host) )
      + assert self.admin.command(SON(command))['ok']

      It will be better to have it to pymongo as every third party lib can use this method.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: