Class: Astrails::Safe::Mongodbdump
- Inherits:
-
Source
show all
- Defined in:
- lib/astrails/safe/mongodbdump.rb
Instance Attribute Summary
Attributes inherited from Source
#id
Attributes inherited from Stream
#config
Instance Method Summary
collapse
Methods inherited from Source
#filename, #initialize, #kind, #timestamp
Methods inherited from Stream
#expand, #initialize
Instance Method Details
#backup ⇒ Object
16
17
18
19
20
|
# File 'lib/astrails/safe/mongodbdump.rb', line 16
def backup
bkp = super
bkp.multi = true
bkp
end
|
#command ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/astrails/safe/mongodbdump.rb', line 4
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
|
#extension ⇒ Object
22
|
# File 'lib/astrails/safe/mongodbdump.rb', line 22
def extension; '.mongodb.dump.tgz'; end
|