TechBuzzPro

How to View a KVM Full Backup File (ZST)

· 5 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

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 zstd installed. 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.zst or backup.img.zst.

Step-by-Step

  1. 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.
  2. Decompress to a new file. Use zstd -d yourbackup.zst -o yourbackup. The -d flag means decompress; -o specifies the output name. This preserves the original .zst file. If you want to delete the original after successful decompression, add --rm.
  3. Check what you got. Run file yourbackup. Common results:
    • POSIX tar archive – a tar file (typical for some KVM backups). Extract with tar -xf yourbackup into 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 yourbackup to see details.
    • VMA archive – Proxmox backup format. You cannot mount it directly; use vma extract yourbackup /path/to/output (part of the proxmox-backup-client or vma package). This will produce disk images and a config file.
  4. 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: use qemu-nbd to expose it as a block device, then mount. Always mount read-only to avoid altering the backup.
  5. 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 .conf with VM settings.
  6. Unmount and clean up. If you mounted, run sudo umount /mnt and 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 -h before decompressing.
  • Mounting read-write. Always use -o ro to 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, tar will not work; you need vma extract. For qcow2, you cannot loop-mount directly; use qemu-nbd.
  • Ignoring file permissions. If you cannot read the file, check ownership and permissions with ls -l; you may need sudo.

Tips

  • Use zstd -l yourbackup.zst to 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 vma tool can also list contents with vma list yourbackup before 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.zst to 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 guestfish or qemu-img info to 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 vma tool installed (package proxmox-backup-client or vma depending on distribution). Check that the file is a complete VMA archive.
  • Permission denied – Run commands with sudo or 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.