Trouble updating discourse after some time - UPGRADE OF POSTGRES FAILED

Since it’s so old, I think I’d recommend just doing a clean install and copying only the backup to the new server.

  • backup old site
  • rsync -rav oldsite:/var/discourse/shared/backups /var/discourse/shared/
  • switch DNS to new server
  • ./discourse-setup (get your SMTP values from the old app.yml) on new server
  • ./launcher enter app
  • discourse backup (this will create the default backup directory with the right permissions)
  • discourse enable_restore
  • discourse restore (this will print the available backups)
  • copy-paste the restore command

A more complicated version would be to rsync everything except the database like this:

rsync -rav --numeric-ids OLD-IP:/var/discourse/shared/ /var/discourse/shared/ --exclude log --exclude postgres_* --exclude redis_data --exclude letsencrypt --exclude ssl --exclude log --exclude tmp --exclude state