Public instance methods
backups
()
[show source]
# File lib/rudy/cli/backups.rb, line 8 8: def backups 9: blist = get_backups 10: print_stobjects blist 11: end
backups_create
()
[show source]
# File lib/rudy/cli/backups.rb, line 39 39: def backups_create 40: @dlist.each do |d| 41: li "Creating backup for #{d.name}" 42: back = d.archive 43: li back 44: end 45: end
backups_create_valid?
()
[show source]
# File lib/rudy/cli/backups.rb, line 31 31: def backups_create_valid? 32: @dlist = Rudy::Disks.list 33: raise "No disks" if @dlist.nil? 34: raise "No path provided" unless @argv.first 35: raise "Disk does not exist" unless Rudy::Disks.exists? @argv.first 36: true 37: end
backups_wash
()
[show source]
# File lib/rudy/cli/backups.rb, line 13 13: def backups_wash 14: dirt = (get_backups || []).select { |b| !b.snapshot_exists? } 15: if dirt.empty? 16: li "Nothing to wash in #{current_machine_group}" 17: return 18: end 19: 20: li "The following backup metadata will be deleted:" 21: li dirt.collect {|b| b.name } 22: 23: execute_check(:medium) 24: 25: dirt.each do |b| 26: b.destroy 27: end 28: 29: end