Class: ForemanMaintain::Cli::RestoreCommand
- Defined in:
- lib/foreman_maintain/cli/restore_command.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#available_checks, #available_procedures, #available_tags, available_tags, completion_map, completion_types, dashize, #dashize, delete_duplicate_assumeyes_if_any, interactive_option, label_option, #label_string, option, #option_wrapper, parameter, #print_check_info, #reporter, #run_scenario, #run_scenarios_and_exit, service_options, subcommand, #tag_string, tags_option, #underscorize
Methods included from ForemanMaintain::Concerns::Logger
Methods included from ForemanMaintain::Concerns::Finders
#check, #detector, #feature, #find_all_scenarios, #find_procedures, #find_scenarios, #procedure
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/foreman_maintain/cli/restore_command.rb', line 14 def execute scenario = Scenarios::Restore.new( :backup_dir => @backup_dir, :incremental_backup => @incremental || incremental_backup?, :dry_run => @dry_run ) rescue_scenario = Scenarios::RestoreRescue.new run_scenario(scenario, rescue_scenario) exit runner.exit_code end |
#incremental_backup? ⇒ Boolean
25 26 27 28 |
# File 'lib/foreman_maintain/cli/restore_command.rb', line 25 def incremental_backup? backup = ForemanMaintain::Utils::Backup.new(@backup_dir) backup.incremental? end |