Technical

How to Download Files from Proxmox Node: LXC Rootfs, VM Disks, and Backups

How to Download Files from Proxmox Node: LXC Rootfs, VM Disks, and Backups

How to download files from Proxmox node usually means one of three things: a file inside an LXC container, a VM’s disk image, or a stored backup. The paths are different for each, and guessing gets you permission errors or a 20GB download when you wanted one config file.

Detailed close-up of ethernet cables and network connections on a router, showcasing modern technology.

File inside an LXC container

The container’s rootfs lives on the host. For a container with ID 101 on local storage, it’s at /var/lib/vz/images/101/ or on ZFS at rpool/data/subvol-101-disk-0. You can just copy from there:

cp /var/lib/vz/images/101/rootfs/etc/nginx/nginx.conf /tmp/nginx.conf

If the container is running and you’d rather not touch the host filesystem, use pct push and pct pull:

pct pull 101 /etc/nginx/nginx.conf /tmp/nginx.conf

That reads the file from inside the container and writes it to the host. No need to mount anything.

VM disk image

VM disks are in /var/lib/vz/images/<vmid>/ or on ZFS as zvols. The file is usually vm-101-disk-0.qcow2 or .raw. Copy it with scp or rsync:

scp root@pve:/var/lib/vz/images/101/vm-101-disk-0.qcow2 .

If it’s a ZFS zvol, you can’t just scp the device node. Use zfs send to stream it:

zfs send rpool/data/vm-101-disk-0 | ssh user@backup 'cat > vm-101-disk-0.zfs'

That gets the whole disk, allocated blocks and all. If you only need a few files, boot the VM and use guest agent or scp from inside.

Photograph of a utility pole and power lines under a bright blue sky with scattered clouds.

Stored backup

Backups from the GUI land in /var/lib/vz/dump/ or your configured backup storage. Files are named vzdump-lxc-101-2024_01_01-00_00_00.tar.zst or vzdump-qemu-101-...vma.zst. Download them via the web UI: Datacenter → Storage → Backup → select file → Download. Or copy from the host:

scp root@pve:/var/lib/vz/dump/vzdump-lxc-101-*.tar.zst .

If backups go to a NAS or NFS share, grab them from there instead. The host path is just a mountpoint.

Which one do you actually need?

For a single config file, pct pull is fastest. For a whole VM, the disk image or a backup. Don’t download a 50GB qcow2 when pct pull 101 /etc/hostname gets you the one line you need. And if you’re moving disks between storages, Proxmox Move All Disks to New Storage has the safe order.

Leave a comment

Comments are reviewed before they appear. Your email is never published.