Sha256: 81c51a90ba99acee9242b6cf0e83f58b6680fc7c0dfea5d1d36df6c3210834e2

Contents?: true

Size: 528 Bytes

Versions: 1

Compression:

Stored size: 528 Bytes

Contents

module Astrails
  module Safe
    class Mongodbdump < Source
      def command
        command = ["mongodump"]
        command << @config[:options] if @config[:options]
        command << "--db #{@id}"
      
        %w[host port out collection].each do |opt|
          command << "--#{opt} #{@config[opt]}" if @config[opt]
        end

        command.join(" ")
      end
      
      def backup
        bkp = super
        bkp.multi = true
        bkp
      end

      def extension; '.mongodb.dump.tgz'; end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webbynode-safe-0.2.5 lib/astrails/safe/mongodbdump.rb