def dump(db, path)
      Mongolicious.logger.info("Dumping database #{db[:db]}")

      cmd = "mongodump -d #{db[:db]} -h #{db[:host]}:#{db[:port]} -o #{path}"
      cmd << " -u '#{db[:user]}' -p '#{db[:password]}'" unless (db[:user].nil? || db[:user].empty?)
      cmd << " > /dev/null"

      system(cmd)
      raise "Error while backuing up #{db[:db]}" if $?.to_i != 0
    end
def dump(db, path)
      Mongolicious.logger.info("Dumping database #{db[:db]}")

      cmd = "mongodump -d #{db[:db]} -h #{db[:host]}:#{db[:port]} -o #{path}"
      cmd << " -u '#{db[:user]}' -p '#{db[:password]}'" unless (db[:user].nil? || db[:user].empty?)
      cmd << " > /dev/null"

      system(cmd)
      raise "Error while backuing up #{db[:db]}" if $?.to_i != 0
    end
Dump database using mongodump.

 @param [Hash] db the DB connection opts.
 @param [String] path the path, where the dump should be stored.

 @return [nil]