Merge pull request #2543 from riking/discourse-script
Strip path from restore filenames
This commit is contained in:
commit
18661fac79
|
@ -40,6 +40,7 @@ WHERE table_schema='public' and (data_type like 'char%' or data_type like 'text%
|
||||||
|
|
||||||
desc "backup", "Backup a discourse forum"
|
desc "backup", "Backup a discourse forum"
|
||||||
def backup(filename = nil)
|
def backup(filename = nil)
|
||||||
|
filename = File.basename(filename)
|
||||||
load_rails
|
load_rails
|
||||||
require "backup_restore"
|
require "backup_restore"
|
||||||
require "export/exporter"
|
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"
|
desc "restore", "Restore a Discourse backup"
|
||||||
def restore(filename)
|
def restore(filename)
|
||||||
|
filename = File.basename(filename)
|
||||||
load_rails
|
load_rails
|
||||||
require "backup_restore"
|
require "backup_restore"
|
||||||
require "import/importer"
|
require "import/importer"
|
||||||
|
|
Loading…
Reference in New Issue