diff --git a/script/discourse b/script/discourse index b7bae9c9c8e..0ce7fb2c1a3 100755 --- a/script/discourse +++ b/script/discourse @@ -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"