Class: RedmineInstaller::Backup

Inherits:
Task show all
Defined in:
lib/redmine-installer/backup.rb

Constant Summary

Constants included from Utils

Utils::PROGRESSBAR_FORMAT

Instance Attribute Summary

Attributes inherited from Task

#options

Instance Method Summary collapse

Methods inherited from Task

#down, #run

Methods included from Utils

#class_name, #create_dir, #env_user, #error, #logger, #ok, #pastel, #print_title, #prompt, #run_command

Constructor Details

#initialize(redmine_root) ⇒ Backup

Returns a new instance of Backup.



4
5
6
7
# File 'lib/redmine-installer/backup.rb', line 4

def initialize(redmine_root)
  super()
  @target_redmine = Redmine.new(self, redmine_root)
end

Instance Method Details

#upObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/redmine-installer/backup.rb', line 9

def up
  @target_redmine.ensure_and_valid_root
  @target_redmine.validate
  @target_redmine.check_running_state
  @target_redmine.make_backup

  puts
  puts pastel.bold('Redmine was backuped')
  logger.info('Redmine was backuped')
end