From 9c2be4dcacd91db7bf4a7c50361b8d63bb79bbcc Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 6 Apr 2018 09:43:32 +0800 Subject: [PATCH] FIX: Restorer wasn't rolling back if restore fails. * This only applies to backup file taken with pg_dump 10.3+ and pg_dump 9.5.12+. --- lib/backup_restore/restorer.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/backup_restore/restorer.rb b/lib/backup_restore/restorer.rb index c5047132fa6..29980edd94a 100644 --- a/lib/backup_restore/restorer.rb +++ b/lib/backup_restore/restorer.rb @@ -64,6 +64,7 @@ module BackupRestore wait_for_sidekiq BackupRestore.move_tables_between_schemas("public", "backup") + @db_was_changed = true restore_dump migrate_database reconnect_database