class RHC::Commands::Snapshot
Public Instance Methods
restore(app)
click to toggle source
# File lib/rhc/commands/snapshot.rb, line 46 def restore(app) rest_app = find_app filename = options.filepath ? options.filepath : "#{rest_app.name}.tar.gz" if File.exists? filename restore_snapshot(rest_app, filename, options.ssh) else raise RHC::SnapshotRestoreException.new "Archive not found: #{filename}" end 0 end
save(app)
click to toggle source
# File lib/rhc/commands/snapshot.rb, line 27 def save(app) rest_app = find_app raise RHC::DeploymentsNotSupportedException.new if options.deployment && !rest_app.supports?("DEPLOY") filename = options.filepath ? options.filepath : "#{rest_app.name}.tar.gz" save_snapshot(rest_app, filename, options.deployment, options.ssh) 0 end