Bobcares

DigitalOcean : Create Droplet from snapshot – Here are the steps to do it

by | Dec 16, 2018

Snapshots are reliable fail-back points for DigitalOcean Droplet owners.

Server owners create DigitalOcean Droplets from snapshots when there is an unexpected server crash, to create a Droplet in another location, etc.

But, how to make sure that this process goes off without a hitch?

At Bobcares, we often receive requests from DigitalOcean customers to create Droplets from snapshot as part of our DigitalOcean Managed Services.

Today, let’s see the steps followed our Support Engineers to create a Droplet from snapshot.

 

DigitalOcean : Create Droplet from Snapshot – 2 important steps

Here are 2 important steps to create a DigitalOcean Droplet from a snapshot.

 

1) Take a Droplet snapshot

Firstly, our Support Engineers create a snapshot of the existing Droplet to save all the current contents of the Droplet.

If you already have a working snapshot, skip this step.

This involves 2 steps.

 

a) Power off the Droplet

We always power off the Droplet before taking the snapshot to avoid data inconsistency.

For instance, when taking a snapshot on a running Droplet, databases don’t guarantee consistent data.

That is, it takes a while to copy a file and the files may change as you copy them, so your backup file become an inconsistent snapshot.

So, as a precaution, we always poweroff the Droplet before taking the snapshot.

Users can poweroff the Droplet from Power >> Poweroff option in the DigitalOcean control panel.

 

digitalocean create droplet from snapshot

How to Poweroff Droplet?

 

However, we always poweroff the server via SSH, because this ensures that all the services are stopped before the server is shutdown.

For instance, we use the below command to shutdown the server from command line.

shutdown -h now

 

b) Take a snapshot of the Droplet

The next step is to take the Droplet snapshot.

Our Support Engineers usually take the snapshot from Snapshots > Take Snapshot option in DigitalOcean control panel.

digitalocean create droplet from snapshot

How to take snapshot from DigitalOcean panel?

 

Alternatively, in some cases, we have to take the snapshot of a running Droplet.

In such cases, we take the snapshot from Snapshots > Take Snapshot > Take live Snapshot in DigitalOcean control panel.

 

2) Create a new Droplet from snapshot

The second step is to create a new Droplet from the snapshot.

Our Support Engineers follow the below steps to create a new droplet from the snapshot.

  • Click Create > Droplets.
  • Click on Snapshots.
  • Select the snapshot.
  • Select the size, Droplet region and additional parameters.
  • Click on Create.

 

digitalocean create droplet from snapshot

How to create a Droplet from snapshot?

 

Alternatively, when we need to create multiple Droplets from the snapshot, we use the command line utility to speed up the process.

For that, we use the DigitalOcean doctl command line client. It uses the DigitaOcean API to access Droplet features.

For instance, we use the below command to create a Droplet from snapshot.

doctl compute droplet create testserver --size 1gb --image debian-8-x64 --region nyc1

 

Here testserver is the Droplet name, Droplet size is 1GB, snapshot name is debian-8-x64 and Droplet region is nyc1.

Most importantly, when creating a new Droplet from snapshot, we ensure that the disk space of the new Droplet is equal to or larger than the Droplet used in snapshot.

This ensures that there is no loss of data during this process.

Also, when a new Droplet is created, it transfers all SSH keys and user accounts from the time the snapshot was created.

Once we create the new Droplet from the snapshot, we always test the services on the new instance as there may be chances that some services will not set to start at boot.

[Need assistance in creating a new Droplet from a snapshot? Our DigitalOcean Experts will get it for you.]

DigitalOcean : Create Droplet from Snapshot – Common failure points

Although creating Droplet from snapshot is a pretty straight forward process, we’ve seen that this can sometimes fail.

Let’s discuss some common scenarios here.

 

1) Create Droplet from snapshot in different region

We’ve seen customers complain that they get the below error when creating a Droplet from a snapshot in a different region.

The image you specified is not available in the selected region, you can make it globally available by initiating an image region transfer from the images tab.

 

In order to create a Droplet from a snapshot taken in another datacenter, this snapshot should be transferred to the region where the new Droplet should be created.

Our Support Engineers transfer the snapshot to other regions from Snapshots > Droplet snapshots > More > Add to region > Click on region name. to fix this issue.

 

[Need assistance in fixing this error? Our DigitalOcean Experts will help you fix this problem.]

2) Create Droplet from command line

Droplet owners usually create Droplets from command line using the snapshots with image slug (for example, centos-6-5-x32, centos-6-5-x64, etc).

However, in some cases, the snapshots don’t come up with a slug to uniquely identify it.

So, in such cases, our Support Engineers get the unique image ID and use it for Droplet creation.

For instance, to create a new Droplet from an image, we first get the unique image ID using the below command.

doctl compute image list-user

 

After that, we create a new Droplet from the image with this image ID.

doctl compute droplet create testserver --size 1gb --image imageID --region nyc1

 

Replace imageID with the unique image ID.

 

Conclusion

In short, create DigitalOcean Droplet from snapshot is useful when there is unexpected server crashes, migration to a new location, and more. Today, we’ve discussed the steps to create a DigitaOcean Droplet from snapshot and the common failure points and how our Cloud Experts fix them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

2 Comments

  1. Umang padh

    Hi,

    After creating droplet from snapshot when I open ipv4 address from browser it’s not working.

    Do you have any idea regarding the same?

    Reply
    • Hiba Razak

      Hi Umang,
      Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF