How to restore backup tar.gz file from console command?

How to restore backup tar.gz file from console command?

You can find your answer

Full command line :

cd /var/discourse
./launcher enter app
discourse restore <filename.of.the.backup.tar.gz>

15 Likes

hi guys,

i had the error like this:

> /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- thor (LoadError)
> 
> from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'

    from script/discourse:3:in `&lt;main&gt;'

any idea for this?
Thanks!

1 Like

I just tried restoring from console and had experienced the same issue.

Is this still working @techapj can we verify?

Can you confirm you saw this exact text? What command did you run?

Also … I think the command is discourse not script/discourse

4 Likes

I can confirm that from inside a production container you want to run discourse restore, not script/discourse.

Also, you can run it without the filename and it’ll suggest the available files, which makes it easy to copy and paste the filename.

7 Likes

Unfortunately, all sessions closed, and backup restored from UI, can’t tell for sure now.

The only thing I remember is there was a ‘cannot load such file’ string.

I was definitely trying script/discourse, so that might be the issue.

4 Likes

I just ran the restore successfully on my sandbox using these commands:

cd /var/discourse
./launcher enter app
discourse enable_restore
discourse restore discourse-2018-01-08-044921-v20171228122834.tar.gz
5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.