diff options
author | Frederic Van Espen <fes@escaux.com> | 2018-12-26 15:33:11 +0100 |
---|---|---|
committer | Frederic Van Espen <fes@escaux.com> | 2018-12-26 15:33:11 +0100 |
commit | 7a58eb2e1612cef1178c9b35df9aaea71cbe04aa (patch) | |
tree | 920a16874148b95d610493ebbfa47867bf450815 /lib/backup | |
parent | 78dcdc871a053e68e60e72d891801895f74b1c79 (diff) | |
download | gitlab-ce-7a58eb2e1612cef1178c9b35df9aaea71cbe04aa.tar.gz |
Allow to override part of the backup filename
Diffstat (limited to 'lib/backup')
-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 a0434a66ef1..792a25422ee 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -234,7 +234,11 @@ module Backup end def tar_file - @tar_file ||= "#{backup_information[:backup_created_at].strftime('%s_%Y_%m_%d_')}#{backup_information[:gitlab_version]}#{FILE_NAME_SUFFIX}" + if ENV['BACKUP'] + @tar_file ||= ENV['BACKUP'] + "#{FILE_NAME_SUFFIX}" + else + @tar_file ||= "#{backup_information[:backup_created_at].strftime('%s_%Y_%m_%d_')}#{backup_information[:gitlab_version]}#{FILE_NAME_SUFFIX}" + end end def backup_information |