Move snapshot from one droplet to another existing droplet?

Posted February 23, 2018 5.2k views
CentOSDigitalOceanSystem ToolsDevelopment

What I’m trying to achieve is something like this:
Take a snapshot of my droplet (which is doing production work at the moment)
Use the snapshot to spin up a droplet.
Do some development on the new, non-production droplet.
Take a snapshot of that NEW droplet and replace the existing PRODUCTION droplet with the snapshot.

I don’t see this as a documented use case, but I imagine there’s some sort of workaround.

Note that the users of the PRODUCTION droplet are using the droplet IP address, and it’s a burden on them to change how they access it – which I’m trying to avoid.

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.

Submit an Answer
2 answers

Yes. You can do this. It sounds like you have the process down but are just missing one piece. You can deploy any snapshot (as long as it exists in the same datacenter, you can copy a snapshot to new datacenters from the Images section of the control panel) to any droplet by using the Restore option in the control panel. If you click the “delete” section for your droplet you will see two options.

  • Delete droplet
  • Rebuild droplet

When rebuilding you can choose to rebuild using any image, OS, one-click app or snapshot.

  • Thanks, ryanpq, for this help.

    In case anyone else is surprised that this method involves the scary “DESTROY” control panel, let me tell you my experience.

    First: Next to the Rebuild button, you’ll see a list of images/snapshots. YOUR SNAPSHOT MAY NOT BE OBVIOUS – the list contains all the basic DO systems – a lot of FreeBSDs, Ubuntus, etc.

    Interspersed – NOT OBVIOUS – will your snapshots. Keep looking.

    Second: What happens to your old snapshots when you rebuild? THEY REMAIN IN PLACE. (thought they might be destroyed, but no.)

I’m working on this same problem, however I have noticed that snapshots from one droplet will not show up on another droplet.

From reading on some other threads, here are some ways I am exploring to get this done, because I don’t want to lose the IP address that I currently have, it creates a ton more work:

Potential Reasons for the Problem:

  • Droplets are not same size. Citation (speculation / hearsay on these forums, no links to documentation)
  • Droplets are in different locations. Citation (speculation / hearsay on these forums, no links to documentation)

Setup Notes: The Floating IP Strategy

Edit: It appears that after doing a Destroy/Rebuild of your Droplet, you loose the IP address, so no matter what you do, you are going to have this, “loss of IP address” which is a problem inherent to Digital Ocean, which they try to solve with something called a, “Floating IP.”

So essentially, before you do the following, you should likely try enabling Floating IP. Note that I did not do this, so I am not 100% sure that this prevents the problem.

Once you have your floating IP, then everything in terms of your DNS setup and Nameserver setup should flow from that floating IP, which you can think of as your, “Internal Unchanging Digital Ocean IP” (in theory - I have not tested this).

Change Region Strategy:

From that link:

you can change region by going to Images -> Snapshots, find your image -> More -> Add to Region -> Select region of original droplet :)

However this is not very helpful. Instead you have to follow this guide, mentioning how to migrate droplets, which mentions a few strategies.

When you create a snapshot, it is available only in the region where it was created. If you want to use the snapshot to create Droplets in other regions, then you’ll need to add the snapshot to the regions where you want to use it.

Personally, I was able to use this strategy to successfully migrate the new “dev server” droplet to the old “production server” droplet - I had my dev server sitting in a different region. However, after migrating, the IP address was changed to the new “dev server” IP address, so it does not fulfill the original objective of the question.

Don’t See Anything Yet? Flush Your Cache.

Flushing the DNS Cache
Windows: ?

Download/Upload Local Strategy: Downloading a snapshot to a local computer for data portability (e.g. download a snapshot from one droplet, upload to another):

I was not able to try this out, this appears to be the more, “old school” way of doing it, and would require that download/upload time, but may be less fraught with problems in the production environment, thereby effecting users less.

Note that one person’s advice was, “use Docker containers.” Yes, that is good advice and we should all be doing that, unless you are looking for an extremely quick fix.