How to View a KVM Full Backup File (ZST)
In this article
To view a KVM full backup file compressed with Zstandard (.zst), you first decompress it with the zstd tool, then inspect the resulting archive (usually a tar or a raw disk image). The exact steps depend on whether the backup is a Proxmox vzdump archive or a plain QEMU/libvirt image. This guide walks through the safe, practical methods.
What You'll Need
- A Linux system (or WSL on Windows) with
zstdinstalled. On Debian/Ubuntu:sudo apt install zstd; on Fedora:sudo dnf install zstd; on Arch:sudo pacman -S zstd. - Enough free disk space to hold the decompressed file (often several times the compressed size).
- Basic command-line familiarity. If you prefer a GUI, you can use a file manager that supports zstd (e.g., Ark on KDE) but the CLI is more reliable.
- The backup file itself, e.g.,
vzdump-qemu-100-2025_01_01-12_00_00.vma.zstorbackup.img.zst.
Step-by-Step
- Identify the file type. Run
file yourbackup.zst. If it reports "Zstandard compressed data", proceed. If it reports something else, the file may be corrupted or not a zstd archive. - Decompress to a new file. Use
zstd -d yourbackup.zst -o yourbackup. The-dflag means decompress;-ospecifies the output name. This preserves the original .zst file. If you want to delete the original after successful decompression, add--rm. - Check what you got. Run
file yourbackup. Common results:- POSIX tar archive – a tar file (typical for some KVM backups). Extract with
tar -xf yourbackupinto a new directory. - QEMU QCOW Image or raw disk image – a virtual disk. You can mount it read-only (see step 4) or use
qemu-img info yourbackupto see details. - VMA archive – Proxmox backup format. You cannot mount it directly; use
vma extract yourbackup /path/to/output(part of theproxmox-backup-clientorvmapackage). This will produce disk images and a config file.
- POSIX tar archive – a tar file (typical for some KVM backups). Extract with
- Mount or inspect the disk image. For raw or qcow2 images, you can use
guestfish(libguestfs) to explore without mounting:guestfish --ro -a yourbackup -i ls /. To mount read-only on the host, first make sure the image is not in use. For raw:sudo mount -o ro,loop yourbackup /mnt. For qcow2: useqemu-nbdto expose it as a block device, then mount. Always mount read-only to avoid altering the backup. - Browse the contents. Once mounted or extracted, you can list files, copy them out, or examine configuration files (e.g.,
/etc/inside the VM). For VMA, the extracted files include a.confwith VM settings. - Unmount and clean up. If you mounted, run
sudo umount /mntand disconnect any NBD device. Delete temporary files if no longer needed to free space.
Common Mistakes
- Decompressing without enough space. A 10 GB .zst can expand to 50 GB or more. Check free space with
df -hbefore decompressing. - Mounting read-write. Always use
-o roto avoid accidental changes that could corrupt the backup. - Assuming all .zst files are the same. A .zst is just compression; the inner format could be tar, raw, qcow2, or VMA. Always check with
file. - Using the wrong extraction tool. For VMA,
tarwill not work; you needvma extract. For qcow2, you cannot loop-mount directly; useqemu-nbd. - Ignoring file permissions. If you cannot read the file, check ownership and permissions with
ls -l; you may needsudo.
Tips
- Use
zstd -l yourbackup.zstto list compression details without decompressing. - For large files, decompress to a different physical disk to avoid I/O bottlenecks.
- If you only need a few files, consider using
zstdcat yourbackup.zst | tar -x --wildcards '*/path/to/file'to extract selectively without full decompression to disk. - Keep a copy of the original .zst until you have verified the decompressed data is intact.
- For Proxmox backups, the
vmatool can also list contents withvma list yourbackupbefore extracting.
Troubleshooting
- “zstd: command not found” – Install zstd as shown in What You'll Need.
- “zstd: unsupported format” – The file may not be a zstd archive, or it is corrupted. Try
zstd -t yourbackup.zstto test integrity. - “No space left on device” – Free up space or decompress to a larger partition.
- “mount: unknown filesystem type” – The image may be encrypted, partitioned, or not a filesystem. Use
guestfishorqemu-img infoto inspect. If it is a full disk image with partitions, you may need to mount a specific partition offset (e.g.,mount -o ro,loop,offset=$((2048*512)) image /mnt). - VMA extraction fails – Ensure you have the
vmatool installed (packageproxmox-backup-clientorvmadepending on distribution). Check that the file is a complete VMA archive. - Permission denied – Run commands with
sudoor adjust file permissions.
Frequently Asked Questions
Can I view a .zst backup without decompressing it?
Not directly for the inner content, but you can list compression info with zstd -l. To see files inside, you must decompress at least partially; tools like zstdcat can stream to other programs without writing a full decompressed file.
What is a VMA file and how do I open it?
VMA (Virtual Machine Archive) is a Proxmox VE backup format. Use the vma command-line tool to list or extract its contents. It is not a standard disk image, so mounting directly is not possible.
Can I use Windows to view a .zst backup?
Yes, with tools like 7-Zip (which supports zstd) or by installing zstd for Windows. However, mounting Linux disk images on Windows requires additional software like Ext2Fsd or WSL2. For VMA, you need a Linux environment.
Is it safe to mount a backup image read-write?
No. Always mount read-only (-o ro) to prevent accidental modification. If you need to modify the VM, restore it to a new location and work on a copy.
How do I know if my backup is a full backup or incremental?
Full backups are self-contained; incremental backups depend on previous ones. The filename or metadata often indicates the type. For Proxmox, full backups are typically named with vzdump-qemu- and no -incr suffix. Check your backup tool's documentation.
What if the decompressed file is much larger than expected?
That is normal; zstd compresses well. Ensure you have enough disk space. If the size seems unreasonable, verify the file integrity with zstd -t.