How to upgrade if `/var/discourse` has only `shared` and is not git repo

Dear all,

I have a Discourse instance setup by the previous admin on our department web server. I don’t know much about Discourse, but it requires updating and suggests doing

        cd /var/discourse
        git pull
        ./launcher rebuild app

But when I cd into /var/discourse I see only the shared directory in there, and git pull fails accordingly (it’s not a git repository). What should I do?

1 Like

You should do a clean install on a new VM, make a backup, and restore it to the new installation.

If you don’t like that answer, then you should get whoever set that thing up to come and fix it.

2 Likes

@pfaffman What do you mean by a new VM? A Docker image for Discourse? The issue is I can’t find a manual how to manage Discourse through Docker.

A new VM means a new virtual server, assuming your instance isn’t on dedicated hardware.

If you have Discourse running but /var/discourse is empty it’s either a very very old installation or an unsupported package.

Either way, you should create a backup, spin up a new virtual server, follow the standard installation guidelines and then restore from backup.

3 Likes

You do this: https://meta.discourse.org/t/discourse-official-standard-installation/142537

2 Likes

This is indeed most likely what’s going on. It’s running Discourse 2.1.0 (if it makes things clearer).

That’s the thing: my instance IS on dedicated hardware.

So, I understand currently no Docker involved. At least, not manually. At least, it’s good to know that there is just one way to set it up and it uses just git clone and the setup script.

What bothers me is how I would gently scrap the old version, given that everything is happening on an actual physical machine (i.e. nothing “virtual”). I did the backup, that’s easy. Now what?

1 Like

Now install on a different machine. A VM is preferable as it’s easier to scale up resources. System requirements are in the install doc.

Once you have the new install running restore that backup.

What kind of instance is this? How busy is it? Is it in constant use?

2 Likes

Oh my…that’s from late mid 2018. You definitely want to update. Besides missing numerous great features, there have been quite a few, including some critical, security fixes that you do not have.

3 Likes

Unfortunately, I don’t have a different machine.

Thank you for the feedback, but that’s not being questioned: I am trying to update. I wasn’t the admin of this instance before yesterday and I know the importance of updates.

Thanks all for the answers! I asked the old guy, and he helped. The Git repo was inside /var/docker instead of /var/discourse for some reason. From there, it was possible to apply the standard procedure. We are now at the latest release (2.6), yay! :tada:

4 Likes

Aha! That was the recommended place in a time long, long ago (before I started using Discourse 4 years ago).

Looks like my “ask the old guy” solution really worked!

5 Likes

I recommend leaving some documentation just in case:

echo "it's in /var/docker" > where-is-launcher
2 Likes

That’s a good idea. Or maybe

 cd /var/
 ln -s /var/docker discourse

Though that might confuse launcher.

1 Like

Not so good idea because /var/discourse does exist and contains shared

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.