Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
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.
This question was answered by @shkitch:
Ok,
I’ll just answer this for myself.
I ssh’d into the droplet and made a /rootfs directory. There be all the important filez.
I targz’d the (stock) droplet root filesystem (without the kernel mountpoints such as /dev, /proc, /sys) and stored the targz archive under /rootfs/stock-droplet.tgz
then, I extracted /rootfs/stock-droplet.tgz archive to /rootfs/stock-droplet. You’ll see why.
I made a targz archive of the source server filesystem, transferred it to the droplet (to /rootfs/source-server.tgz), and extracted it to /rootfs/source-server. You’ll see why.
then, I booted the droplet with the recovery kernel. Instructions on how to do this are here: https://www.digitalocean.com/community/tutorials/how-to-recover-from-file-system-corruption-using-fsck-and-a-recovery-iso
“mkdir /target”
I mounted the droplet’s root filesystem from the recovery kernel (initramfs) under /target. Instructions on how to do this are given in the link above, too. Note that the extracting in the previos steps is mandatory because the recovery initramfs image doesn’t have neither tar nor gzip!
then, I removed pretty much everything from the targets’s root filesystem (rm -rf /target/{usr,lib*,bin,sbin,etc} …), leaving only th stuff in /target/boot, some empty mountpoints such as /target/{tmp,run,dev,proc,sys}, and of course /target/root and /target/rootfs
I copied the important stuff from the source server’s root filesystem to the target root filesystem (e.g. “/target/rootfs/source-server/bin/cp -av /rootfs/source-server/{bin,sbin,usr,var,lib*} /target”)
I copied a few configuration files back from the stock droplet’s root filesystem to the new droplet’s root filesystem (“/target/rootfs/source-server/bin/cp -av /target/rootfs/stock-droplet/etc/networking/interfaces /target/etc/networking”, “/target/rootfs/source-server/bin/cp -av /target/rootfs/stock-droplet/etc/fstab /target/etc”, “/target/rootfs/source-server/bin/cp -av /target/rootfs/stock-droplet/etc/udev/rules.d/* /target/etc/udev/rules.d” )
umount /target, reboot
rejoice!
… hope this works for somebody else, too.
You can see the comment here.
This question was answered by @shkitch:
Ok,
I’ll just answer this for myself.
I ssh’d into the droplet and made a /rootfs directory. There be all the important filez.
I targz’d the (stock) droplet root filesystem (without the kernel mountpoints such as /dev, /proc, /sys) and stored the targz archive under /rootfs/stock-droplet.tgz
then, I extracted /rootfs/stock-droplet.tgz archive to /rootfs/stock-droplet. You’ll see why.
I made a targz archive of the source server filesystem, transferred it to the droplet (to /rootfs/source-server.tgz), and extracted it to /rootfs/source-server. You’ll see why.
then, I booted the droplet with the recovery kernel. Instructions on how to do this are here: https://www.digitalocean.com/community/tutorials/how-to-recover-from-file-system-corruption-using-fsck-and-a-recovery-iso
“mkdir /target”
I mounted the droplet’s root filesystem from the recovery kernel (initramfs) under /target. Instructions on how to do this are given in the link above, too. Note that the extracting in the previos steps is mandatory because the recovery initramfs image doesn’t have neither tar nor gzip!
then, I removed pretty much everything from the targets’s root filesystem (rm -rf /target/{usr,lib*,bin,sbin,etc} …), leaving only th stuff in /target/boot, some empty mountpoints such as /target/{tmp,run,dev,proc,sys}, and of course /target/root and /target/rootfs
I copied the important stuff from the source server’s root filesystem to the target root filesystem (e.g. “/target/rootfs/source-server/bin/cp -av /rootfs/source-server/{bin,sbin,usr,var,lib*} /target”)
I copied a few configuration files back from the stock droplet’s root filesystem to the new droplet’s root filesystem (“/target/rootfs/source-server/bin/cp -av /target/rootfs/stock-droplet/etc/networking/interfaces /target/etc/networking”, “/target/rootfs/source-server/bin/cp -av /target/rootfs/stock-droplet/etc/fstab /target/etc”, “/target/rootfs/source-server/bin/cp -av /target/rootfs/stock-droplet/etc/udev/rules.d/* /target/etc/udev/rules.d” )
umount /target, reboot
rejoice!
… hope this works for somebody else, too.