Merge pull request #2067 from riking/better-backup-name
Add site name to beginning of backup filename
This commit is contained in:
commit
f52ab7fc77
|
@ -7,7 +7,7 @@ require_dependency "homepage_constraint"
|
|||
# This used to be User#username_format, but that causes a preload of the User object
|
||||
# and makes Guard not work properly.
|
||||
USERNAME_ROUTE_FORMAT = /[A-Za-z0-9\_]+/ unless defined? USERNAME_ROUTE_FORMAT
|
||||
BACKUP_ROUTE_FORMAT = /\d{4}(-\d{2}){2}-\d{6}\.tar\.gz/i unless defined? BACKUP_ROUTE_FORMAT
|
||||
BACKUP_ROUTE_FORMAT = /[a-zA-Z0-9\-_]*\d{4}(-\d{2}){2}-\d{6}\.tar\.gz/i unless defined? BACKUP_ROUTE_FORMAT
|
||||
|
||||
Discourse::Application.routes.draw do
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ module Export
|
|||
@dump_filename = File.join(@tmp_directory, BackupRestore::DUMP_FILE)
|
||||
@meta_filename = File.join(@tmp_directory, BackupRestore::METADATA_FILE)
|
||||
@archive_directory = File.join(Rails.root, "public", "backups", @current_db)
|
||||
@archive_basename = File.join(@archive_directory, @timestamp)
|
||||
@archive_basename = File.join(@archive_directory, "#{SiteSetting.title.parameterize}-#{@timestamp}")
|
||||
end
|
||||
|
||||
def listen_for_shutdown_signal
|
||||
|
|
Loading…
Reference in New Issue