themactep.com

A home of miscellaneous projects by Paul Philippov.

Notes

How to download snapshot of a droplet from DigitalOcean

$ ssh root@droplet "dd if=/dev/vda | gzip -1 -" | dd of=image.gz
$ gunzip image.gz
$ sudo losetup --partscan --find --show image
> /dev/loopX
$ sudo mount /dev/loopXp1 /mnt
....
$ sudo umount /mnt
$ sudo losetup -d /dev/loopX