From 5ef75c9c615ba6d0c51c14a67f6d9839765d4f74 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 9 Mar 2018 15:48:12 +0800 Subject: [PATCH] Improve grep pattern in restorer. --- lib/backup_restore/restorer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backup_restore/restorer.rb b/lib/backup_restore/restorer.rb index 7b66de1b4d4..b2723b53ee4 100644 --- a/lib/backup_restore/restorer.rb +++ b/lib/backup_restore/restorer.rb @@ -256,7 +256,7 @@ module BackupRestore def get_dumped_by_version output = Discourse::Utils.execute_command( File.extname(@dump_filename) == '.gz' ? 'zgrep' : 'grep', - '-m1', @dump_filename, '-e', "pg_dump", + '-m1', @dump_filename, '-e', "-- Dumped by pg_dump version", failure_message: "Failed to check version of pg_dump used to generate the dump file" )