To make a compressed image in your case:
1. Search web for live USB - such as Gparted, (check that the live USB OS flavor shouldn't mount drives automatically)
2. Burn a USB stick with it's ISO - on another computer
3. Attach a keyboard & monitor to your PVE computer PC
4. Boot the PC (PVE) with the above USB stick (check your BIOS boot order for this)
5. Then find a spare USB drive and attach it to the computer (PVE)
6. Then do the following command:
7. Then identify from the output which disk is the one that contains your VMs & LXCs - I'm going to call it
/dev/sdX
- yours will be different - check carefully
8. Then identify from the output which disk is the one that contains your attached spare USB drive/partition - I'm going to call it
/dev/sdY
- yours will be different - check carefully
9. Then mount the attached spare USB drive like this:
Code:
# replace /sdY with your actual spare attached USB drive/partition - see 8 above
mount /dev/sdY /mnt
10. Then issue the following command to make a compressed image of the source drive (the one that contains your VMs & LXCs - I've called it /dev/sdX - see 7 above) to the destination (/mnt - see 9 above)
Code:
# replace sdX - as 7 above
dd if=/dev/sdX status=progress conv=sync,noerror | gzip -c > /mnt/vms_lxcs_drive_backup.img.gz
This will create an image called
vms_lxcs_drive_backup.img.gz
on
sdY
(your spare USB drive/partition). It can take some time depending on the size of
/dev/sdX
.
11. When finished issue the following command to unmount the USB spare attached drive:
Code:
# replace sdY with your attached USB spare drive/partition - as above
umount /dev/sdY /mnt
Shutdown the computer and unattach the spare USB drive.
Thats it - you should have a backup image of your VMs & LXCs drive on the spare USB drive.