Atualizando de 2.6.0.beta1 para a versão mais recente

Hello,

we are currently running on 2.6.0.beta1 and now want to upgrade to the latest version, but a stable one. As 2.6.0 is an old version, is there anything we need to worry about? Of course we will do a backup first, but maybe there are some hints :slight_smile:

There is little chance that the OS of your VM is supported. I recommend that you Move a Discourse site to another VPS with rsync, skipping the database files, build the new container and then restore a backup from the existing site.

Actually, I would probably recommend that you run a fresh discourse-setup rather than using your existing app.yml and copy over the SMTP settings and such. There have been some changes there too.

Pretending for a minute that you perform OS upgrades on the VM to get it up to date, there have also been at least two postgres upgrades since then. Trying to upgrade in place will not go well. If you try, and it fails, I won’t say “I told you so,” but I won’t say anything else, either.

Many thanks for your answer. As we also need to move to a new server, the original plan was to migrate the old discourse first to the new server and then do the update.

Would you still recommend to install new discourse?

Moving to the new server is much safer since you don’t need to change the old server until the new one is working!

What I would do is follow the rsync guide, excluding postgres_*. Then I’d rename app.yml and run ./discourse-setup --skip-connection-test (because the DNS won’t be pointing to the new server yet. Then restore the backup. You can (usually) test that the new server works by changing your local DNS to point to it, but worst case, you just change the DNS and if it’s a disaster you change the DNS back. (If it’s digital ocean or something else with a floating-ip that can be pointed to multiple VMs then you can just re-point than and not fuss with DNS.

I’ve done this about 10 times in the past couple of months. If you’d rather not do it yourself, I’m available.

1 curtida

Hi Jay,

I have contacted you via private message.

1 curtida

OK, this is something I always wondered about. No need for a staging domain? Nothing gets rewritten (twice) because the domain changes (twice)?

If you copy the ssl and let’s encrypt directories, you have the certs for the existing host name. The server is ready to serve that domain, but dns doesn’t point there, so it can’t.

I usually just copy over the existing yml files, but for this very old site, getting a fresh one is not a bad idea, and in this case, I think I’ve learned that there were some strange modifications that I think will be good to leave behind).

BUT, if you’re clever you can trick your browser into going there and see that things look good, and then you can switch the dns so everyone else sees it. (and hopefully remember to un-trick your browser so that you’re not very confused sometime in the future.)