Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2021-11-11 00:12:46 +00:00
parent 7b2f941669
commit 5eba9c0d33
9 changed files with 54 additions and 8 deletions

View File

@ -99,9 +99,10 @@ module Backup
# - 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{10})(?:_\d{4}_\d{2}_\d{2}(_\d+\.\d+\.\d+((-|\.)(pre|rc\d))?(-ee)?)?)?_gitlab_backup\.tar$/
matched = backup_file?(file)
next unless matched
timestamp = Regexp.last_match(1).to_i
timestamp = matched[1].to_i
if Time.at(timestamp) < (Time.now - keep_time)
begin
@ -192,6 +193,10 @@ module Backup
private
def backup_file?(file)
file.match(/^(\d{10})(?:_\d{4}_\d{2}_\d{2}(_\d+\.\d+\.\d+((-|\.)(pre|rc\d))?(-ee)?)?)?_gitlab_backup\.tar$/)
end
def non_tarred_backup?
File.exist?(File.join(backup_path, 'backup_information.yml'))
end
@ -314,3 +319,5 @@ module Backup
end
end
end
Backup::Manager.prepend_mod