mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:01:26 +08:00
FIX: Backup script with custom filename needs to include version number.
This commit is contained in:
@ -41,6 +41,9 @@ class DiscourseCLI < Thor
|
||||
backup = backuper.run
|
||||
if filename.present?
|
||||
puts "Moving '#{backup}' to '#{filename}'"
|
||||
puts "Including version number into '#{filename}'"
|
||||
version_string = File.basename(backup)[/-#{BackupRestore::VERSION_PREFIX}\d{14}/]
|
||||
filename = filename.dup.insert(filename.index('.'), version_string)
|
||||
FileUtils.mv(backup, filename)
|
||||
backup = filename
|
||||
end
|
||||
|
Reference in New Issue
Block a user