I’m trying to migrate discourse from a personal hosting to a Amazon LightSail server. I’ve searched the forum and read all the posts about migrating servers and settings up discourse:
Move your Discourse Instance to a Different Server
Restore a backup from command line
How To Install Discourse on Ubuntu 18.04 | DigitalOcean
discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub
As I understand the process is:
- Install new Discourse server
- Export backup from existing discourse (current the backup is configured to be saved on S3 but I understand this will be manual file backup)
- Import backup to new discourse (manually since it can’t pick it up from S3 as I understand)
I’m a little stuck with now to do Step 1 given a few constraint that I have a single domain name and I want to keep the same domain name for the new server and I won’t want any down time (my goal is to complete the new server setup, restore the back and then finally change the DNS entry to point to the new server thereby avoiding any downtime since both server will be running at the same time).
As I understand, when I setup the new Discourse server, I can copy the app.yml
from the existing server to the new server and then run discourse-setup
. The problem I see here is that when I do this, it’ll use the same DNS name as the existing server (which is what I want) but I foresee two issues here which I’m trying to figure out
- The lets-encrypt certificate won’t generate a SSL certificate for the new server since the domain name still points to the old server
- Without the SSL certificate (the old server config is set to only use SSL which will be carried over in app.yml) so the server won’t start
- I’ve tried connecting to the discourse server by using a DNS name redirection, but if the URL entered doesn’t match the
app.yml
configuration, either NGINX or Discourse won’t work, you’ll get an error in the browser while trying to connect. So without a web interface I can’t launch the restore process
So how do I complete the setup of the new discourse server using the existing server app.yml
and then restore the backup followed by a DNS switch over? OR is there a different easier way to do this?