mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
Merge pull request #2067 from riking/better-backup-name
Add site name to beginning of backup filename
This commit is contained in:
commit
f52ab7fc77
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue