How to switch from Google Cloud to Digital Ocean

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?


Hi @Dilmurat. There doesn’t seem to be a straight forward way, but what I would do is:

  1. Change DNS ttl (time-to-live) to lowest possible value, so when you perform migration, it happens faster.
  2. Move files manually using rsync.
  3. Create users / groups again from scratch.
  4. Verify your setup on new server
  5. Point DNS to your new server
  6. Allow remote access on your new database from your old server, and set old server to use new database. In case some visitors visit your site, and is directed to the old server, at least the new database is being used. This will prevent dataloss.

Dear @mattiasf, I faced with the need to migrate virtual machines from Google Cloud to DigitalOcean. Could you please share your experience and migration instructions?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

How to migrate from google cloud to digital ocean, the all-in on wp won’t work, what are the steps that need to be taken, please??

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

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.