Snapshots From DigitalOcean
Snapshots From DigitalOcean
Snapshots From DigitalOcean
Leonid Burceacov
Since DigitalOcean is now (starting Oct 2016) charging 5 cents per gigabyte per month
for storing images, it's a good time as ever to take things into your own hands and
download snapshots to your own PC. To do that, you are going to make a copy of the
image's hard drive and save it to a local machine. For the purposes of this article I'm
going to copy my old Ubuntu server running Wordpress and MySQL.
First off, login into cloud.digitalocean.com and click on the Create Droplet button
located in the upper right corner. From there navigate to Snapshots (found under
Choose an image) and select the image that you want to copy. Choose the droplet
size, datacenter region, etc and click on Create.
After a about a minute your new droplet will be available. Connect via SSH to test if
it's working (you should be able to find the IP address in the Droplets section). Now
you can start copying the server's hard drive to your HDD. For this we'll use a tool
called dd. If you're on Linux, you're good to go; if you're on Windows, then you'll need
MinGW or something similar to run dd.
Here "root" is the root-user, "ipaddress" is the IP address of the droplet you
recently created, "/dev/vda1" is the name of hard drive that you intend to copy (run
"df -h" on remote to find the actual name) and "image" is the name of resulting raw
https://www.linkedin.com/pulse/download-snapshots-from-digitalocean-leonid-burceacov 1/4
8/1/23, 19:18 Download snapshots from DigitalOcean
image. You might need to add "-p1234" if you changed the default port like I
Leonid Burceacov
originally did, where "1234" is the alternative port.
The reason for using root here is that by default you are not allowed to use dd as a non-
root user. One way to fix this this is to use sudo; I personally went with the less safe
way of allowing myself to connect as root via SSH, since on one hand I had Fail2Ban
already up and running, and on the other this droplet will be deleted in less than 2
hours.
After running that command you will be prompted to enter your root password. Note
that there will be no progress indication after that and in about 10-15 minutes (for the
20GB HDD that is about 10% full) you'll see something like:
41943040+0 records in
Which means you're good to go! After that you have several options:
Now you can safely destroy the droplet and delete the snapshot. No more wasted
money, hooray!
30 ·
9 comentarios
3 años
Hi Leonid Burceacov,
All right?
Thanks a lot!
https://www.linkedin.com/pulse/download-snapshots-from-digitalocean-leonid-burceacov 2/4
8/1/23, 19:18 Download snapshots from DigitalOcean
Recomendar
Responder
Leonid Burceacov
Usuario de LinkedIn
3 años
To see the progress of the dd use status=progress like below
Satnam Singh
3 años
Leonid Burceacov, You shared very useful information, Thanks a lot.
Recomendar
Responder
3 años
Hi Leonid,
I used this method to download a copy of my Ubuntu but I can't re-upload the gz file to
DO (for testing). Can you help? Thank you very much.
Recomendar
Responder
Usuario de LinkedIn
4 años
Thanks for the article. I tried to recover using virtual box without any luck. Getting error:
No bootable device found! Looks like the grub is missing? Were you able to restore the
droplet finally?
Recomendar
Responder
Roberto Giangreco
5 años
Thanks for this post!. Did you test to recover the snapshot backed up to other droplet
from local to DO infra?
Recomendar
Responder
Prikshit Gupta
5 años
Really thanks for this article, really appreciate that. Can you also write how to restore dro‐
plet to new droplet?
Recomendar
Responder
1 recomendación
Timothy Verry
5 años
Thanks, after seeing the invoice for this month I have been looking for a way to download
an image myself rather than paying DO to store them! I saw this tip on another forum, but
no one had replied back whether or not they have been able to successfully restore their
personally stored image. Have you tried it?
Recomendar
Responder
2 recomendaciones
5 años
Excelente información
Recomendar
Responder
Ver más comentarios
3 Smart Ways to Download Free Full Text Articles for Your Literature Review
Dr. Ram Mishra
·
3 años
© 2023 Acerca de
Idioma
https://www.linkedin.com/pulse/download-snapshots-from-digitalocean-leonid-burceacov 4/4