Module: Astrails::Safe
- Defined in:
- lib/astrails/safe.rb,
lib/astrails/safe/s3.rb,
lib/astrails/safe/gpg.rb,
lib/astrails/safe/gzip.rb,
lib/astrails/safe/page.rb,
lib/astrails/safe/pipe.rb,
lib/astrails/safe/sftp.rb,
lib/astrails/safe/sink.rb,
lib/astrails/safe/local.rb,
lib/astrails/safe/backup.rb,
lib/astrails/safe/pgdump.rb,
lib/astrails/safe/source.rb,
lib/astrails/safe/stream.rb,
lib/astrails/safe/archive.rb,
lib/astrails/safe/svndump.rb,
lib/astrails/safe/tmp_file.rb,
lib/astrails/safe/mysqldump.rb,
lib/astrails/safe/cloudfiles.rb,
lib/astrails/safe/config/node.rb,
lib/astrails/safe/config/builder.rb
Defined Under Namespace
Modules: Config, TmpFile Classes: Archive, Backup, Cloudfiles, Gpg, Gzip, Local, Mysqldump, Page, Pgdump, Pipe, S3, Sftp, Sink, Source, Stream, Svndump
Constant Summary collapse
- ROOT =
File.join(File.dirname(__FILE__), "..", "..")
Class Method Summary collapse
Class Method Details
.safe(&block) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/astrails/safe.rb', line 40 def safe(&block) config = Config::Node.new(&block) #config.dump [[Mysqldump, [:mysqldump, :databases]], [Pgdump, [:pgdump, :databases]], [Archive, [:tar, :archives]], [Svndump, [:svndump, :repos]] ].each do |klass, path| if collection = config[*path] collection.each do |name, config| klass.new(name, config).backup.run(config, :gpg, :page, :gzip, :local, :s3, :cloudfiles, :sftp) end end end Astrails::Safe::TmpFile.cleanup end |