mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Pretend to allow full path to backup files
This commit is contained in:
parent
3368e23fe4
commit
2ad2dee0e9
1 changed files with 2 additions and 0 deletions
|
@ -40,6 +40,7 @@ WHERE table_schema='public' and (data_type like 'char%' or data_type like 'text%
|
|||
|
||||
desc "backup", "Backup a discourse forum"
|
||||
def backup(filename = nil)
|
||||
filename = File.basename(filename)
|
||||
load_rails
|
||||
require "backup_restore"
|
||||
require "export/exporter"
|
||||
|
@ -62,6 +63,7 @@ WHERE table_schema='public' and (data_type like 'char%' or data_type like 'text%
|
|||
|
||||
desc "restore", "Restore a Discourse backup"
|
||||
def restore(filename)
|
||||
filename = File.basename(filename)
|
||||
load_rails
|
||||
require "backup_restore"
|
||||
require "import/importer"
|
||||
|
|
Loading…
Reference in a new issue