99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# File 'lib/pho/command_line.rb', line 99
def restore()
url = @opts["url"]
if url == nil
puts "Restoring #{@store.storeuri} from latest snapshot"
snapshot = Pho::Snapshot.read_from_store(@store)
url = snapshot.url
end
puts "Restoring from #{url}"
resp = Pho::Jobs.submit_restore(@store, url, "Reset", Time.now)
puts "Monitoring Restore Job: #{resp.header["Location"].first}"
job = Pho::Jobs.wait_for_submitted(resp, @store) do |job, message, time|
puts "#{time} #{message}"
end
puts "Restore Completed"
end
|