Sha256: 206198d5810d6e928b4277e055fed826abc60b23b0236954604b552090238685
Contents?: true
Size: 631 Bytes
Versions: 4
Compression:
Stored size: 631 Bytes
Contents
module Astrails module Safe class Mongodump < Source def command opts = [] opts << "--host #{@config[:host]}" if @config[:host] opts << "-u #{@config[:user]}" if @config[:user] opts << "-p #{@config[:password]}" if @config[:password] opts << "--out #{output_directory}" "mongodump -q \"{xxxx : { \\$ne : 0 } }\" --db #{@id} #{opts.join(" ")} && cd #{output_directory} && tar cf - ." end def extension; '.tar'; end protected def output_directory File.join(TmpFile.tmproot, "mongodump") end end end end
Version data entries
4 entries across 4 versions & 2 rubygems