Sha256: 71a5107d8bbed930c6a2faef44fae3146de9fb0945999057bfa7c60d9865b1ca

Contents?: true

Size: 973 Bytes

Versions: 1

Compression:

Stored size: 973 Bytes

Contents

require 'extensions/mktmpdir'
require 'astrails/safe/tmp_file'

require 'astrails/safe/config/node'
require 'astrails/safe/config/builder'

require 'astrails/safe/stream'

require 'astrails/safe/source'
require 'astrails/safe/mysqldump'
require 'astrails/safe/pgdump'
require 'astrails/safe/archive'

require 'astrails/safe/pipe'
require 'astrails/safe/gpg'
require 'astrails/safe/gzip'

require 'astrails/safe/sink'
require 'astrails/safe/local'
require 'astrails/safe/s3'


module Astrails
  module Safe
    ROOT = File.join(File.dirname(__FILE__), "..", "..")

    def timestamp
      @timestamp ||= Time.now.strftime("%y%m%d-%H%M")
    end

    def safe(&block)
      config = Config::Node.new(&block)
      #config.dump

      Astrails::Safe::Mysqldump.run(config[:mysqldump, :databases])
      Astrails::Safe::Pgdump.run(config[:pgdump, :databases])
      Astrails::Safe::Archive.run(config[:tar, :archives])

      Astrails::Safe::TmpFile.cleanup
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
markmansour-safe-0.1.7 lib/astrails/safe.rb