Upgrade from an outdated version



I got a pretty outdated (1.9.0 beta4 +166) Discourse forum for administration. It’s a complete mess (CORS enabled with editing the source code, etc.) and I want to put it back on track. I tried to make a local Discourse install from stable branch (1.9.7) and restore the site from a recent backup via admin interface. It simply crashed and an older backup from March was rolled back so it’s a disaster atm.

My question is: how can make this monster work on a recent version without losing the data?

Any idea is welcome :tired_face:


What I would do : install a local Discourse on the same version than your forum (1.9.0 b4), restore and try a ./launcher rebuild app.

You’ll have to run the command twice because there were some postgre sql updates.

It may be the reason why your backup doesn’t work yet, the database may need some upgrading too :thinking:


@Steven: thanks for the reply. Tried with v1.9.0.beta4 but I get this error:

I, [2018-05-27T22:34:18.200420 #14]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
LoadError: /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.11/lib/mini_racer_extension.so: undefined symbol: _ZTIN2v811ArrayBuffer9AllocatorE - /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.11/lib/mini_racer_extension.so
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.11/lib/mini_racer.rb:2:in `<top (required)>'
/var/www/discourse/config/application.rb:22:in `<top (required)>'
/var/www/discourse/Rakefile:5:in `require'
/var/www/discourse/Rakefile:5:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
I, [2018-05-27T22:34:22.500385 #14]  INFO -- :

Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 16126 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

I’m clueless, because it’s the same config as the current prod version and it works flawlessly with stable :face_with_raised_eyebrow:

(Richard - DiscourseHosting.com) #4

This is related to a buggy version of mini_racer. I’m not familiar with the way the docker rebuild works, but you should be on 0.1.15 or up. Maybe someone else can explain to you how to edit the Gemfile so it will pull in a new mini_racer gem and rebuild using docker?


I solved this problem with restoring the DB from backup and then rebuilt the image with 1.9.7. Quick and dirty but worked :wink: