Class: PrlBackup::CLI

Inherits:
Object
  • Object
show all
Includes:
Mixlib::CLI
Defined in:
lib/prlbackup/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.startObject

Run the backups with given options and arguments.



48
49
50
# File 'lib/prlbackup/cli.rb', line 48

def start
  self.new.start(ARGV)
end

Instance Method Details

#start(argv) ⇒ Object

Parse options and create safe backups for the selected virtual machines.



54
55
56
57
58
59
60
# File 'lib/prlbackup/cli.rb', line 54

def start(argv)
  parse_options!(argv)
  selected_virtual_machines.each do |vm|
    vm.safely_backup
    vm.cleanup if config[:keep_only]
  end
end