Class: RedmineInstaller::RestoreDB
- Defined in:
- lib/redmine-installer/restore_db.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from Task
Instance Method Summary collapse
-
#initialize(database_dump, redmine_root) ⇒ RestoreDB
constructor
A new instance of RestoreDB.
- #up ⇒ Object
Methods inherited from Task
Methods included from Utils
#class_name, #create_dir, #env_user, #error, #logger, #ok, #pastel, #print_title, #prompt, #run_command
Constructor Details
#initialize(database_dump, redmine_root) ⇒ RestoreDB
Returns a new instance of RestoreDB.
4 5 6 7 8 9 |
# File 'lib/redmine-installer/restore_db.rb', line 4 def initialize(database_dump, redmine_root) super(database_dump: database_dump.to_s) @environment = Environment.new(self) @redmine = Redmine.new(self, redmine_root) end |
Instance Method Details
#up ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/redmine-installer/restore_db.rb', line 11 def up @environment.check @redmine. @redmine.ensure_and_valid_root @redmine.validate @redmine.check_running_state @redmine.restore_db puts puts pastel.bold('Database was restored') logger.info('Database was restored') end |