diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-23 18:06:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-23 18:06:14 +0000 |
commit | c792263edfaf826c58f4aa41d26904464a17a3e7 (patch) | |
tree | b57ae96c9eeaf0a1432a29f7f50f2fce9529818d /lib/backup | |
parent | 6f9edd1a4c4942d3d13ec54793cfae56164b1a0a (diff) | |
download | gitlab-ce-c792263edfaf826c58f4aa41d26904464a17a3e7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/backup')
-rw-r--r-- | lib/backup/manager.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index c0390959269..ce0c4c5d974 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -127,7 +127,7 @@ module Backup end tar_file = if ENV['BACKUP'].present? - "#{ENV['BACKUP']}#{FILE_NAME_SUFFIX}" + File.basename(ENV['BACKUP']) + FILE_NAME_SUFFIX else backup_file_list.first end @@ -235,8 +235,8 @@ module Backup end def tar_file - @tar_file ||= if ENV['BACKUP'] - ENV['BACKUP'] + "#{FILE_NAME_SUFFIX}" + @tar_file ||= if ENV['BACKUP'].present? + File.basename(ENV['BACKUP']) + FILE_NAME_SUFFIX else "#{backup_information[:backup_created_at].strftime('%s_%Y_%m_%d_')}#{backup_information[:gitlab_version]}#{FILE_NAME_SUFFIX}" end |