Starting Over with Old Database

(James R Hull 🎬) #1

Hi there -

I’ve been running Discourse on DigitalOcean for the past two years. Just this week I tried to upgrade and every time I tried to do it from the control panel it would fail.

I tried SSH’ing in and doing it manually, but for some reason DO’s setup of Discourse–at least at the time I originally set it up–didn’t have the var/discourse directory. Regardless, now I’m getting 502 and I can’t get my application to start back up again. Running the logs app from the /docker directory I get Could not find activesupport-4.2.8 in any of the sources

What I would love to do is to start completely over - perhaps by installing with whatever new paradigm DO/Discourse has for 2017 BUT I want to be able to keep my old database - my years of posts, comments, etc.

Is there any resource or suggestion anyone would have about how to go about doing this? I would super appreciate it as I have a pretty big active community that is wondering what happened!

Thank you

(Rafael dos Santos Silva) #2

Start a new droplet on Digital Ocean, install Discourse using the official guide and after the first login upload your last backup and restore.

(James R Hull 🎬) #3

Thanks! Sounds super obvious - but two questions:

  • Is this better than the one-click install app option on DO? What’s the difference?
  • How do I go about downloading my last backup? What is the location of all the important info?

In DO, my only options are to Create Droplet from a Backup or Restore Droplet from a Backup, nothing about downloading - but I’m sure I can do it manually if I know the essential parts.

(Joshua Rosenfeld) #4

The one-click install is out of date (2 major versions if I’m not mistaken) and there have been a number of support requests recently that appeared to be related to the DO install.

Are you still able to access Discourse from the browser? If so, download your backup from /admin/backups. If not, the files are located (by default) in /var/discourse/shared/standalone/backups/default. If you can find the installation location in your droplet, the shared folder should exist and from there you should be able to get the backups.

(James R Hull 🎬) #5

And if I somehow don’t have a /var/discourse folder but a var/docker folder…does that sound right?

I can’t get into the control panel from the browser, only SSH through Terminal.

Also, just realized, these are DO’s automatic backups of the entire droplet done once a week. Unless Discourse does backups automatically I might not have them in that location.

(Joshua Rosenfeld) #6

That is where Discourse used to be installed (years ago), so yes, that sounds right.

Discourse does do automated backups, and that is what you should be looking for. DO droplet backups will not help you reinstall Discourse and then restore the database.

(Felix Freiberger) #7

This #howto may provide additional help:

(Sam Saffron) #8

What ?! ?! We got to contact Digital Ocean about this @codinghorror originally the plan was for this to be updated weekly by Digital Ocean staff.

(Joshua Rosenfeld) #9

Before contacting DO I’d really appreciate it if someone would double check me on that. I’ve never personally used the DO one-click install…I’ve just seen reports of people doing it and coming in with old versions.

Edit: I’ve got some credit, testing this now…

(Sam Saffron) #10

Hold off… I was just doing that …

indeed, this is a blast from the past!

commit 0113fce420bcf3bc18a38c6864150334fdefa273
Author: Sam <>
Date:   Tue Apr 12 13:29:48 2016 +1000

    FEATURE: automatically close topics with 10k+ posts
    FEATURE: automatically close messages with 2k+ posts

    Both configurable via `auto_close_messages_post_count`
    and `auto_close_topics_post_count`
root@delete-me-app:/var/www/discourse# cat /VERSION
root@delete-me-app:/var/www/discourse# git branch
* tests-passed
root@delete-me-app:/var/www/discourse# psql --version
psql (PostgreSQL) 9.3.11

Looks like it is 1.6.0.beta.1, vintage :wine_glass: Discourse.

Yeah, if Digital Ocean are not keeping this up to date we really should lobby them to remove it.

Also for added bonus, vintage ubuntu:

root@delete-me:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.4 LTS
Release:	14.04
Codename:	trusty

And you also get an old version of Docker that has lots of known issues:

root@delete-me:~# docker version
 Version:      1.10.3

(r3d_f0x) #11

I installed with it and it upgraded when I rebuilt it and ran the setup.

(Jeff Atwood) #12

They have been contacted by @techAPJ multiple times, if you would like to take a run at it feel free.

(Sam Saffron) #13

Yeah I am doing my usual Twitter, Contact Support at DigitalOcean etc dance. I suspect the old maintainers of this have moved along.