summaryrefslogtreecommitdiff
path: root/lib/backup/manager.rb
diff options
context:
space:
mode:
authorBalasankar "Balu" C <balasankar@gitlab.com>2018-01-15 20:33:35 +0530
committerBalasankar "Balu" C <balasankar@gitlab.com>2018-01-15 20:33:35 +0530
commitad25ef1f0d7e85e2b9797f30721caab00f62dfc2 (patch)
tree0317b93caa7c155ae77bb0c4b44cb4486b5e4e8f /lib/backup/manager.rb
parent377d5c9ec32f9957eee4a9a397a8d18cad1274ac (diff)
downloadgitlab-ce-ad25ef1f0d7e85e2b9797f30721caab00f62dfc2.tar.gz
List available backups for restore
Diffstat (limited to 'lib/backup/manager.rb')
-rw-r--r--lib/backup/manager.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index 05aa79dc160..c6c6fca6b74 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -108,7 +108,12 @@ module Backup
$progress.puts "Please make sure that file name ends with #{FILE_NAME_SUFFIX}"
exit 1
elsif backup_file_list.many? && ENV["BACKUP"].nil?
- $progress.puts 'Found more than one backup, please specify which one you want to restore:'
+ $progress.puts 'Found more than one backup:'
+ # print list of available backups
+ backup_file_list.each do |item|
+ $progress.puts " " + item.gsub("#{FILE_NAME_SUFFIX}", "")
+ end
+ $progress.puts 'Please specify which one you want to restore:'
$progress.puts 'rake gitlab:backup:restore BACKUP=timestamp_of_backup'
exit 1
end