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

help for copy database

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

            Assignee:
            mike Michael Dirolf
            Reporter:
            namlook Namlook
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: