Commit b5526a2d authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'gl-version-backup-file' into 'master'

Add GitLab version to backup file name

See merge request !10901
parents 8e91aa9b 3bce1295
---
title: Refactor backup/restore docs
merge_request:
author:
This diff is collapsed.
......@@ -15,7 +15,7 @@ module Backup
s[:gitlab_version] = Gitlab::VERSION
s[:tar_version] = tar_version
s[:skipped] = ENV["SKIP"]
tar_file = "#{s[:backup_created_at].strftime('%s_%Y_%m_%d')}#{FILE_NAME_SUFFIX}"
tar_file = "#{s[:backup_created_at].strftime('%s_%Y_%m_%d_')}#{s[:gitlab_version]}#{FILE_NAME_SUFFIX}"
Dir.chdir(backup_path) do
File.open("#{backup_path}/backup_information.yml", "w+") do |file|
......
......@@ -350,7 +350,7 @@ describe 'gitlab:app namespace rake task' do
end
it 'name has human readable time' do
expect(@backup_tar).to match(/\d+_\d{4}_\d{2}_\d{2}_gitlab_backup.tar$/)
expect(@backup_tar).to match(/\d+_\d{4}_\d{2}_\d{2}_\d+\.\d+\.\d+(-pre)?_gitlab_backup.tar$/)
end
end
end # gitlab:app namespace
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment