Sha256: f0a192a27156e121747bb4a5892e4effeb585a1cbd7235b8294f567f14e14383
Contents?: true
Size: 625 Bytes
Versions: 1
Compression:
Stored size: 625 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
akupchanko-astrails-safe-0.3.1 | lib/astrails/safe/mongodump.rb |