Module: WebTranslateIt::Safe
- Defined in:
- lib/web_translate_it/safe.rb,
lib/web_translate_it/safe/s3.rb,
lib/web_translate_it/safe/gpg.rb,
lib/web_translate_it/safe/gzip.rb,
lib/web_translate_it/safe/pigz.rb,
lib/web_translate_it/safe/pipe.rb,
lib/web_translate_it/safe/sftp.rb,
lib/web_translate_it/safe/sink.rb,
lib/web_translate_it/safe/local.rb,
lib/web_translate_it/safe/backup.rb,
lib/web_translate_it/safe/pgdump.rb,
lib/web_translate_it/safe/source.rb,
lib/web_translate_it/safe/stream.rb,
lib/web_translate_it/safe/archive.rb,
lib/web_translate_it/safe/tmp_file.rb,
lib/web_translate_it/safe/mongodump.rb,
lib/web_translate_it/safe/mysqldump.rb,
lib/web_translate_it/safe/config/node.rb,
lib/web_translate_it/safe/config/builder.rb
Defined Under Namespace
Modules: Config, TmpFile
Classes: Archive, Backup, Gpg, Gzip, Local, Mongodump, Mysqldump, Pgdump, Pigz, Pipe, S3, Sftp, Sink, Source, Stream
Constant Summary
collapse
- ROOT =
File.join(File.dirname(__FILE__), '..', '..')
Class Method Summary
collapse
Class Method Details
.process(config) ⇒ Object
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/web_translate_it/safe.rb', line 50
def process(config)
[[Mysqldump, i[mysqldump databases]],
[Pgdump, i[pgdump databases]],
[Mongodump, i[mongodump databases]],
[Archive, i[tar archives]]].each do |klass, path|
next unless collection = config[*path]
collection.each do |name, c|
klass.new(name, c).backup.run(c, :gpg, :pigz, :gzip, :local, :s3, :sftp)
end
end
WebTranslateIt::Safe::TmpFile.cleanup
end
|
.safe ⇒ Object
46
47
48
|
# File 'lib/web_translate_it/safe.rb', line 46
def safe(&)
Config::Node.new(&)
end
|