lib/shelly/cli/backup.rb in shelly-0.4.15 vs lib/shelly/cli/backup.rb in shelly-0.4.16
- old
+ new
@@ -110,9 +110,12 @@
def import(kind, filename)
app = multiple_clouds(options[:cloud], "backup import KIND FILENAME")
unless ::File.exist?(filename)
say_error "File #{filename} doesn't exist"
end
+ unless ['postgresql', 'mongodb'].include?(kind)
+ say_error "Kind is invalid. You can import backup of: postgresql, mongodb"
+ end
if options[:reset]
say_warning "You are about to reset database #{kind} for cloud #{app}"
say_warning "Next, database will be restored to state from file #{filename}"
question = "I want to reset and import the database from dump (yes/no):"
say_new_line