diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-05-23 17:11:00 +0300 |
---|---|---|
committer | kushalpandya <kushal@gitlab.com> | 2017-05-23 17:24:05 +0300 |
commit | 8b46dfdc6bcd5f0174dd44482412695a94a33c54 (patch) | |
tree | 9289f5d6b7e7f7cc15bf4236234be59a772dfb6f /lib | |
parent | b0358caa2cca761be404344b98aa3df8d6a2e10c (diff) |
Merge branch 'fix-backup-raketask' into 'master'
Add missing regex to backup manager
Closes #32669
See merge request !11635
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backup/manager.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index 330cd963626..f755c99ea4a 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -84,7 +84,11 @@ module Backup Dir.chdir(backup_path) do backup_file_list.each do |file| - next unless file =~ /(\d+)(?:_\d{4}_\d{2}_\d{2})?_gitlab_backup\.tar/ + # For backward compatibility, there are 3 names the backups can have: + # - 1495527122_gitlab_backup.tar + # - 1495527068_2017_05_23_gitlab_backup.tar + # - 1495527097_2017_05_23_9.3.0-pre_gitlab_backup.tar + next unless file =~ /(\d+)(?:_\d{4}_\d{2}_\d{2}(_\d+\.\d+\.\d+.*)?)?_gitlab_backup\.tar$/ timestamp = $1.to_i |