Class: Ariranha::Base
- Inherits:
-
Object
- Object
- Ariranha::Base
- Defined in:
- lib/ariranha/base.rb
Instance Method Summary collapse
- #backup ⇒ Object
-
#initialize(config_file = 'config.yml') ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config_file = 'config.yml') ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 |
# File 'lib/ariranha/base.rb', line 7 def initialize(config_file = 'config.yml') @config = YAML.load(File.open(config_file)) config_instances config_directories end |
Instance Method Details
#backup ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/ariranha/base.rb', line 13 def backup instances.each do |instance| filename = instance.backup directories.each { |dir| dir.upload(filename, instance.database) } puts "deleting /tmp/#{filename}..." Open3.capture3 "rm -rf /tmp/#{filename}" end end |