How to switch from Google Cloud to Digital Ocean

September 24, 2019 377 views
DNS IPv6

I am migrating servers from Google Cloud engine to DigitalOcean. I’d like to ensure there’s zero-down time. I know I can update the DNS servers (but this will take some time). I would like to reroute any traffic coming to Google Cloud engine to my new DO server.

Any advice?

2 Answers

Hello, @mattiasf

You can migrate your sites over to DigitalOcean and test them using your hosts file on your PC and make sure everything is working fine before switching the DNS to DigitalOcean. In this way you can make sure everything is working properly on DigitalOcean and you will prevent any issues when switching the DNS. If you’re not familiar with the process let me know and I can provide you with detailed instructions in order to set your hosts file.

When you switch the DNS from Google Cloud to DigitalOcean there will be some propagation and some of the visitors may still “see” the version hosted on Google’s end. DNS changes might take up to 48 hours due to DNS cache from all the ISPs, but usually happens a lot faster.

Simply switching the DNS over should be completely fine. I don’t know if you’re running an eCommerce website or a simple blog, but even if someone places an order on your site or publish any comment/post and etc you can still re-migrate only the missing content/database table/row in order to make sure everything is updated on DigitalOcean end.

Another solution is that during the DNS propagation you can simply put a holding (coming soon/under maintenance page) for an hour or two in order to prevent any issues. This is something I’ve done before in order to make sure no one will visit the version on the old host during the DNS propagation.

If you have any questions, feel free to ask.

Hey! Thanks for your answer. The only real trouble I have is managing the SSL certificate through letsencrypt. Because while I am testing and DNS haven’t resolved yet, I don’t see it possible to make a letsencrypt certificate using the
certbot

  • Yes, that is correct. The cerbot will work once the DNS propagation is in place. From my previous experience, once you switch the DNS over you should be able to issue a new Let’s Encrypt SSL Certificate in the next hour or so.

    Let me know how it goes.

Have another answer? Share your knowledge.