diff --git a/config/routes.rb b/config/routes.rb index 312f93a1c1e..c684da82fe7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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 diff --git a/lib/export/exporter.rb b/lib/export/exporter.rb index 03944431ef7..178bee089c4 100644 --- a/lib/export/exporter.rb +++ b/lib/export/exporter.rb @@ -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