Migrando para uma nova instância em novo provedor de hospedagem

Temos um fórum rodando na AWS, em um domínio personalizado com SSL via Let’s Encrypt, e estamos planejando migrar para o Digital Ocean, idealmente sem tempo de inatividade. Existe alguma prática recomendada, pois tenho encontrado uma variedade de problemas?

Primeiro, tentei configurar a nova instância e habilitar o Let’s Encrypt, mas isso causou todo tipo de problema (por exemplo, SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE) – presumivelmente porque estava tentando configurar a nova instância usando o mesmo nome de domínio na configuração que o site ao vivo existente.

Em seguida, tentei configurar a instância sem SSL (mas com a instância configurada no mesmo nome de domínio) e restaurar um backup do site ao vivo. Desta vez, o processo de restauração falhou com o que parecia ser problemas relacionados ao nome de domínio.

Configurar uma nova instância em um novo domínio é realmente fácil (obrigado! :pray:), mas tentar criar uma nova instância para a qual eu possa simplesmente fazer uma troca de DNS para migrar parece ser realmente difícil. A menos, claro, que eu esteja apenas fazendo errado!

Qualquer ajuda será apreciada.

1 curtida

I’m not making any promises, but if the current site is a standard install, you can copy over your the letsencrypt and ssl directories and those certs should get copied over and it’ll rebuild just fine. It can be a bit tricky, though.

Worst case, you’ll need to rebuild the site after the DNS switch.

7 curtidas

Would INSTALL-cloud.md instructions work modified like this, on the new target host?:

sudo -s
git clone GitHub - discourse/discourse_docker: A Docker image for Discourse /var/discourse
cd /var/discourse
[copy letsencrypt, ssl directories & containers/app.yml from current running instance]
./discourse-setup

Then on to using the web UI to restore from backup, and DNS switch?

Any recommendations for tests to perform before the DNS switch?

Many thanks for any helpful pointers!

You don’t need discourse-setup, just ./launcher rebuild app. You should be able to change your local DNS to point it to the new server and have it work.

1 curtida

Excellent, thanks for the tips!