Upgrading from Discourse

(Jessp01) #1

Hello all,

I have installed this instance using the now deprecated method listed here:

I understand the current recommended install is via Docker which I am fine with.
However, looking here:

It says: Both the new and old Discourses MUST BE ON THE EXACT SAME VERSION to ensure proper backup/export.

How do I upgrade the existing instance to latest or, is there another easier option?
I am fine with any solution so long as there is no data loss.



Someone chime in if I’m in the wrong here, but it seems you would need to upgrade your current install first, then migrate the data to the new server with a docker install.

This is towards the bottom of the link in your OP


# Run these commands as the discourse user
bluepill stop
bluepill quit
# Back up your install
pg_dump --no-owner --clean discourse_prod | gzip -c > ~/discourse-db-$DATESTAMP.sql.gz
tar cfz ~/discourse-dir-$DATESTAMP.tar.gz -C /var/www discourse
# get the latest Discourse code
cd /var/www/discourse
git checkout master
git pull
git fetch --tags
# To run on the latest numbered release instead of bleeding-edge:
#git checkout latest-release
# Follow the section below titled:
# "Check sample configuration files for new settings"
bundle install --without test --deployment
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake db:migrate
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake assets:precompile
# restart bluepill
crontab -l
# Here, run the command to start bluepill.
# Get it from the crontab output above.

(Jeff Atwood) #3

Already covered at

(Jeff Atwood) #4