Extracting files from backup

droidus

Well-Known Member
Apr 5, 2020
112
2
58
35
This is the command that I ran:
dd if=/dev/mapper/pve-vm--108--disk--0 of=/mnt/vm-108-disk-0.backup
How can I (if possible) extract these files in Linux?
 
VM dont use file systems that get somehow compressed in an archive. They use block devices. So if you want to access the data on a block device you need to mount the filesystems that is creataed ontop of it somewhere. How to mount it really depends on how the guest had partitioned/formated that block device.
 
Last edited:
you can use losetup or kpartx to expose the img file as block device again, and then proceed depending on which storage stack you used inside the VM. obviously there are some limitations (e.g., if you backed up a non-linux VM's disk, linux might not be able to access the data at all) and possible pitfalls (e.g., LVM and ZFS both don't like duplicate VG/pool names, so proceed with caution or do the restore in another VM ;))