How do you install an earlier version of Discourse?


(AstonJ) #1

I only have a backup of an older version and its recommend that both the install and backup are the same version - but how can I specify a specific version of Discourse on install?.


Failure when trying to install older version of discourse
(John Muhl) #2

There should be a version key in your app.yml file.

  #version: tests-passed

Remove the # and change test-passed to the version you want to use; e.g. v1.3.4. Tags · discourse/discourse · GitHub shows the available version strings.


NoMethodError: undefined method `auth_token=' for #<User:0x0055cd7bbc1828>
Creating a duplicate of production environment
(AstonJ) #3

Thanks @johnmuhl, do you know how I can find the version from my backup?

In meta.json (in the backup) it says:

{"source":"discourse","version":20150728004647}


(Régis Hanol) #4

That’s the version of the database in rails parlance (ie: the latest migration that was run). Looks like it’s from 2015/07/28.


(AstonJ) #5

Yeah that’s the date of the backup too, however looking at Releases · discourse/discourse · GitHub the closest version seems to be Version v1.4.0.beta6 but I have restored that and when I go to upload a backup it says it has uploaded but it doesn’t show in the list of backups. Maybe I need to wipe everything and start again : /


(Kane York) #6

You should be able to restore any older version to the current version - we keep all the info necessary to upgrade the database.


(AstonJ) #7

Do you mean I can install a new version of Discourse and then upload an older backup (of an older version) and restore it?


(Régis Hanol) #8

Exactly. Unless you’ve installed a plugin that requires a migration, you can restore old backups just fine :wink:


(AstonJ) #9

Ok thanks, I’ll try again.

Though not sure why they backup isn’t showing in the control panel (it’s there in shared/standalone/backups/default).