Frequently Asked Question

Turn VPS into qcow2
Last Updated 4 years ago

Step 1. Use DD to zero out any deleted data on the partition, so that compression size of the backup is smaller.
dd if=/dev/zero of=0bits bs=20M; rm 0bits
Step 2. Use DD to byte copy the Digital Ocean partition, feeding it into gzip, and then transfer it over SSH to the Storage Location.

dd if=/dev/vda | gzip -1 - | ssh @ dd of=/storage/location/snapshot.image.gz

Step 3. Extract the gzipped image.

gunzip /storage/location/snapshot.image.gz

Step 4. Convert the DD image to a the qcow2 disk format with the 'qemu-img' utility.

qemu-img convert -O qcow2 /storage/location/snapshot.image /storage/location/snapshot.qcow2

Please Wait!

Please wait... it will take a second!