lib/shelly/cli/backup.rb in shelly-0.2.23 vs lib/shelly/cli/backup.rb in shelly-0.2.24

- old
+ new

@@ -36,10 +36,11 @@ else say "No database backups available" end end + map "download" => :get desc "get [FILENAME]", "Download database backup" long_desc %{ Download given database backup to current directory. If filename is not specyfied, latest database backup will be downloaded. } @@ -51,11 +52,11 @@ backup.download(bar.progress_callback) say_new_line say "Backup file saved to #{backup.filename}", :green rescue Client::NotFoundException => e - raise unless e.resource == :database_backup + raise unless e.resource == :backup say_error "Backup not found", :with_exit => false say "You can list available backups with `shelly backup list` command" end desc "create [DB_KIND]", "Create backup of given database" @@ -89,10 +90,10 @@ ask_to_restore_database app.restore_backup(filename) say_new_line say "Restore has been scheduled. Wait a few minutes till database is restored.", :green rescue Client::NotFoundException => e - raise unless e.resource == :database_backup + raise unless e.resource == :backup say_error "Backup not found", :with_exit => false say "You can list available backups with `shelly backup list` command" rescue Client::ConflictException => e say_error e[:message] end