Droplet migration


  • we have a website hosted with DO for the past 7 years and in those 7 years we did exactly 0 updates to Ubuntu, Apache, php, …
  • at this point we are running Ubuntu 14, php 5.6, … and we would like to update everything (to Ubuntu 20, php at least 7.4, …)

We figure to best way to update everything right now would be to create a new Droplet from scratch, set it up, migrate the files there, test everything out and when ready - “somehow” switch the current Droplet with the new one.

Here’s the idea we have so far and I’d like to know if this is doable or not:

  • 1-click install a new Droplet
  • migrate files to new Droplet but keep DB pointed to the old (current) one
  • test everything out on the new Droplet
  • once ready, put everything in maintenance mode and migrate the DB to the new Droplet
  • (and here’s the crucial part) repoint users to this new Droplet – how would we do this?

Since we already have everything we need in our account - could we just go to => Networking > Domains and repoint the IPs from the old Droplet to the new one? Would this work? Would this need time to propagate or would it be immediate? I’m guessing we’d need to rekey the SSL certificates after we’re done?


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
January 26, 2021
Accepted Answer

Hi @williamd991e9db2513f2cfb1c,

As I can see you’ve got it 90% figured out, great plan by the way!

Here is how I’ll do it as I see it as the easiest. It’s mostly the same as your plan but with small different details.

  1. First, as usual, create the new droplet
  2. Install all the necessary software on it (Apache, MySQL, Nginx etc.)
  3. Once you’ve installed all that you need on it, migrate(transfer over) your application to the new droplet but DO NOT change the A records to point to the new droplet
  4. Use hosts files to test your application on the new Droplet.
  5. Once you confirm everything is correct, do a last rsync from the old to the new droplet to sync any changes done to the live application while you were testing it on the new droplet.
  6. Right after the rsync finishes, change the DNS settings from the old to the new droplet.
  7. Wait about 24 hours for the DNS to propagate and the domain to start fully working from the new droplet
  8. Turn off the old droplet.

That’s it, your application/s would be working from the new droplet now without a problem.

Regards, KFSys

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel