How would I go about moving a Ubuntu 14 box from Digital Ocean to physical hardware?
2 Answers
You need to download an image of the disk that exists on your VPS provider. The problem here is that the most common setup for a VPS is a server with a single "hard drive" attached to it, and you can't reliably make a disk image of a system while it's running without specialized tools or processes. Also, where would the disk image go since trying to take a snapshot of the disk while it's being imaged creates a problem.
If your VPS provider lets you download a disk image/snapshot/backup directly, great, you can just do that. However, most don't provide that functionality directly and instead you have to do it yourself. To do that you need to either create a new volume/disk and attach it to the server or launch a new VPS and attach the disk you're trying to image to that server. In either case, you need a system running Linux that has two disks attached, one the disk you're trying to image and the other a (larger) disk of where to store the image.
Next get the name of the disk you're imaging, in this example we'll call it /dev/sdb
. You don't have to actually mount
the disk you're trying to image, but instead do something like this:
dd if=/dev/sdb of=/where/to/write.img status=progress
The status=progress
is so that you can monitor the progress. If you're doing this over SSH you might want to run this all as a setsid
command (setsid dd ...
) so that it doesn't get killed if you disconnect.
Once you have that .img
file you can reverse the process by plugging a disk into a machine running Linux locally, in this example I'll call the disk we plugged in /dev/sdc
dd if=write.img of=/dev/sdc status=progress
If you're feeling snazzy you can try to do all of this without an intermediate storage disk on your VPS by booting into a Live CD and copying the files over an SSH tunnel by running this command on your VPS while booted into the Live CD:
dd if=/dev/sdb | ssh -C user@ip_of_home_pc dd of=disk.img
This takes advantage of the fact that SSH actually hooks up standard input/output streams and passes the output of the dd
imaging process over a compressed (-C
) SSH connection.

- 5,509
One solution is to create an ISO image from your current Ubuntu 14 box and then mount the ISO image onto a USB drive, using the USB drive to boot from next time for installation.
See this similar question/answer for more information.

- 449
dd
to create a diskdump if you have the diskspace for it,. – Rinzwind Jan 23 '19 at 16:36lspci
on your DO server, and see all these devices than run only in VMs:SCSI storage controller: Red Hat, Inc Virtio SCSI
,Ethernet controller: Red Hat, Inc Virtio network device
, etc... Backup your config and reinstall a fresh system (with a 18.xx release). – xenoid Jan 23 '19 at 17:25