Commits

Josh Ourisman committed 3e61b3c

added username and password support to MongoDumper

  • Participants
  • Parent commits 11fb9a0

Comments (0)

Files changed (1)

File adamanteus.py

         # For now we need to use mongodump, will switch to
         # mongoexport with MongoDB 1.5
         dump_options = ['mongodump', '--out=%s' % self.path, self.database]
-
+        if self.username is not None:
+            dump_options.append('-u %s' % self.username)
+        if self.password is not None:
+            dump_options.append('-p %s' % self.password)
         call(dump_options)
 
 class MySQLDumper(Dumper):