[TUTORIAL] Examples on how to mount PBS backup images for file level restoring

entilza

Active Member
Jan 6, 2021
143
30
33
48
Mounting PBS Backups for File level restore using Command Line Interface

Show latest backups:
# proxmox-backup-client list --repository root@pam@10.1.16.44:tank9

To show all backups/snapshots:
# proxmox-backup-client snapshot list --repository root@pam@10.1.16.44:tank9

To show all backups/snapshots for a specific vm: (ex: vm/200)

# proxmox-backup-client snapshot list vm/200 --repository root@pam@10.1.16.44:tank9
┌─────────────────────────────┬─────────┬────────────────────────────────────────────────────────────────────────┐ │ snapshot │ size │ files │ ╞═════════════════════════════╪═════════╪════════════════════════════════════════════════════════════════════════╡ │ vm/200/2023-07-28T21:16:59Z │ 214 GiB │ client.log drive-scsi0.img drive-scsi1.img index.json qemu-server.conf │ ├─────────────────────────────┼─────────┼────────────────────────────────────────────────────────────────────────┤ │ vm/200/2023-08-25T21:16:41Z │ 214 GiB │ client.log drive-scsi0.img drive-scsi1.img index.json qemu-server.conf │ ├─────────────────────────────┼─────────┼────────────────────────────────────────────────────────────────────────┤ │ vm/200/2023-09-29T21:16:43Z │ 214 GiB │ client.log drive-scsi0.img drive-scsi1.img index.json qemu-server.conf │ ├─────────────────────────────┼─────────┼────────────────────────────────────────────────────────────────────────┤ │ vm/200/2023-10-20T21:16:53Z │ 214 GiB │ client.log drive-scsi0.img drive-scsi1.img index.json qemu-server.conf │ ├─────────────────────────────┼─────────┼────────────────────────────────────────────────────────────────────────┤ │ vm/200/2023-10-23T22:01:36Z │ 214 GiB │ client.log drive-scsi0.img drive-scsi1.img index.json qemu-server.conf │ ├─────────────────────────────┼─────────┼────────────────────────────────────────────────────────────────────────┤ │ vm/200/2023-10-24T21:17:14Z │ 214 GiB │ client.log drive-scsi0.img drive-scsi1.img index.json qemu-server.conf │ ├─────────────────────────────┼─────────┼────────────────────────────────────────────────────────────────────────┤

Mount an image (.img)

# proxmox-backup-client map vm/200/2023-10-23T22:01:36Z drive-scsi1.img --repository root@pam@10.1.16.44:tank9
Image 'root@pam@10.1.16.44:8007:tank9:vm/200/2023-10-23T22:01:36Z/drive-scsi1.img' mapped on /dev/loop0

# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 150G 1 loop ├─loop0p1 259:0 0 16M 1 part └─loop0p2 259:1 0 150G 1 part

# mount /dev/loop0p2 /mnt/test/
mount: /mnt/test: WARNING: source write-protected, mounted read-only.

# cd /mnt/test
# ls -l
<< /mnt/test directory shows contents of drive-scsi1.img (partition 2 in this example)
# cd /
# umount /mnt/test
# proxmox-backup-client unmap /dev/loop0

Mounting / Restoring PVE files: (.pxar files)

# proxmox-backup-client snapshot list --repository root@pam@10.1.16.44:tank9 | grep host

│ host/pve-art/2023-10-30T10:25:01Z │ 2.787 MiB │ catalog.pcat1 index.json pve-etc.pxar │
│ host/pve-art/2023-10-31T10:25:01Z │ 2.787 MiB │ catalog.pcat1 index.json pve-etc.pxar

proxmox-backup-client mount host/pve-art/2023-10-30T10:25:01Z pve-etc.pxar /mnt/test/ --repository root@pam@10.1.16.44:tank9

FUSE library version: 3.10.3

# cd /mnt/test
# ls -l
<< /etc directory shows - copy whatever you need>>
# cd /
# umount /mnt/test
 
Last edited:
  • Like
Reactions: wbk and vonkrolock

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!