[SOLVED] Need a little help with proxmox-backup-client mount

Cookiefamily

Well-Known Member
Jan 29, 2020
136
40
48
Germany
Hello,

I was poking around in the man pages for the proxmox-backup-client and discovered the "mount" command and decided to test it.
Firstoff: the man page is not complete
Code:
proxmox-backup-client map <snapshot> <archive-name> [OPTIONS]


       Map a drive image from a VM backup to a local loopback device. Use 'unmap' to undo.  WARNING: Only do this with trusted backups!


       <snapshot> <string>
              Group/Snapshot path.


       <archive-name> <string>
              Backup archive name.


       Optional parameters:


       --keyfile <string>
              Path to encryption key.


       --repository <string>
              Repository URL.


       --verbose <boolean> (default=false)
              Verbose output and stay in foreground.
but when you enter proxmox-backup-client mount you get the following help:
Code:
Usage: proxmox-backup-client <snapshot> <archive-name> <target> [OPTIONS]
 <snapshot> <string>
Group/Snapshot path.

<archive-name> <string>
Backup archive name.

<target> <string>
Target directory path.

Optional parameters:

--keyfile <string>
Path to encryption key.

--repository <string>
Repository URL.

--verbose <boolean> (default=false)
Verbose output and stay in foreground.
There is the hint about a target missing, but no big deal, you will discover that quite quickly.

So I tried mounting a drive that was backed up via the PVE integration:
proxmox-backup-client mount vm/102/2020-11-03T03:03:25Z drive-scsi0.img.fidx /testmounts/ --repository store02 (tried with and without the .fidx)
I recieve the following Error:
Code:
Error: Can only mount/map pxar archives and drive images.
Is .img not a drive image?
 
map and mount are two different invocations

'map' maps block backups to a loopback device

'mount' mounts a pxar archive via fuse
 
After performing a backup with proxmox backup client, I want to restore the .img disks and assign those disks to a proxmox VE vm
¿Cómo puedo hacerlo sin descargar disks.img a mi PC personal y luego transferirlos a proxmox VE?

root@pve01-poz:/mnt/pve/Snapshots/dump# proxmox-backup-client list

│ vm/dev-tresuelve │ vm/dev-tresuelve/2022-05-11T10:26:35Z │ 2 │ disk-2-sdc.img index.json disk-0-sda.img disk-1-sdb.img

I want to import these 3 disks to then perform a qm import to assign to a specific vm


command intro Proxmox VE:
proxmox-backup-client mount vm/dev-tresuelve/2022-05-11T10:26:35Z disk-0-sda.img.fidx /dev/rbd/Storage_Vms/vm-125 --repository pve-cluster_poz@pbs@10.0.0.6:Cluster-poz

Error: Can only mount/map pxar archives and drive images.
 
Last edited:
see my previous answer:
map and mount are two different invocations

'map' maps block backups to a loopback device

'mount' mounts a pxar archive via fuse

if you want to map .img files, you have to use 'map'
 
ok i will use map.
Once I have the image in a loopback, what procedure do I have to follow to assign the image to a VM?

tranks
 
oh ok you want to restore the img files? the you should use the 'restore' command of the backup client, and 'qm importdisk' to import them to a vm
 
Ok, this is the backup I have on PBS

│ vm/dev-treuelve │ vm/dev-tresuelve/2022-05-11T10:26:35Z │ 1 │ disk-0-sda.img disk-1-sdb.img disk-2-sdc.img index.json

I have tried to use the following command from the PVE server:
"proxmox-file-restore extract vm/dev-tresuelve/2022-05-11T10:26:35Z disk-0-sda.img /mnt/snap/"

The command output is a failure: "Error: 'disk-0-sda.img' is not supported for file-restore"

The procedure is correct?, if it is not, can you tell me what it is step by step, it would be very useful

thanks for your time
 
you must use the path that you get from

'proxmox-file-restore list <snapshot> /'

for example

Code:
# proxmox-file-restore list vm/111/2022-05-13T07:45:01Z /
┌──────┬──────────────────────┬───────────────┬─────────────┐
│ type │ name                 │ last modified │        size │
╞══════╪══════════════════════╪═══════════════╪═════════════╡
│ v    │ drive-scsi0.img.fidx │               │ 34359738368 │
└──────┴──────────────────────┴───────────────┴─────────────┘
# proxmox-file-restore list vm/111/2022-05-13T07:45:01Z /drive-scsi0.img.fidx
┌──────┬───────┬───────────────┬──────┐
│ type │ name  │ last modified │ size │
╞══════╪═══════╪═══════════════╪══════╡
│ v    │ part  │               │      │
├──────┼───────┼───────────────┼──────┤
│ v    │ zpool │               │      │
└──────┴───────┴───────────────┴──────┘
# proxmox-file-restore list vm/111/2022-05-13T07:45:01Z /drive-scsi0.img.fidx/zpool 
┌──────┬───────┬───────────────┬──────┐
│ type │ name  │ last modified │ size │
╞══════╪═══════╪═══════════════╪══════╡
│ d    │ zroot │               │      │
└──────┴───────┴───────────────┴──────┘

and so on. if you then know the path you can use extract with the same path
 
Hello,
root@pve03-poz:/etc/ssl# proxmox-file-restore list vm/dev-tresuelve/2022-05-11T10:26:35Z /
┌──────┬─────────────────────┬───────────────┬─────────────┐
│ type │ name │ last modified │ size │
╞══════╪═════════════════════╪═══════════════╪═════════════╡
│ v │ disk-0-sda.img.fidx │ │ 32212254720 │
├──────┼─────────────────────┼───────────────┼─────────────┤
│ v │ disk-1-sdb.img.fidx │ │ 21474836480 │
├──────┼─────────────────────┼───────────────┼─────────────┤
│ v │ disk-2-sdc.img.fidx │ │ 21474836480 │
└──────┴─────────────────────┴───────────────┴─────────────┘
root@pve03-poz:/etc/ssl# proxmox-file-restore list vm/dev-tresuelve/2022-05-11T10:26:35Z /disk-0-sda.img.fidx
certificate validation failed - Certificate fingerprint was not confirmed.
qemu-system-x86_64: -drive file=pbs:repository=10.0.0.6:Cluster_poz,,snapshot=vm/dev-tresuelve/2022-05-11T10:26:35Z,,archive=disk-0-sda.img.fidx,read-only=on,if=none,id=drive0: PBS connect failed: command error: error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1913:
Error: Starting VM failed. See output above for more information.



I got this error, I don't understand why since I have that same cluster server validated against the PBS. How can we solve the certificate problem?


Thank you very much for your time and for the explanation so detailed that you have given me
 
if you use the cli tools, you must give the proper parameters/set the proper environment variables. for file-restore it should be the same as the proxmox-backup-client, see https://pbs.proxmox.com/docs/backup-client.html
when configured in pve, it does it automatically there, but not when you manually invoke the commands
 
if you use the cli tools, you must give the proper parameters/set the proper environment variables. for file-restore it should be the same as the proxmox-backup-client, see https://pbs.proxmox.com/docs/backup-client.html
when configured in pve, it does it automatically there, but not when you manually invoke the commands
Sorry about the delay in responding,
The variables that I have used are the same that I have used to consult the disks of the VM and to make the backup with the "proxmox backup client", but to recover the disks I do not know why it indicates that the certificate is not valid, in fact when executing the command "proxmox-file-restore list vm/dev-tresuelve/2022-05-11T10:26:35Z /disk-0-sda.img.fidx" that accepts the fingerprint.
 
Hey pablomart81, you're making good progress! To move forward, try configuring these environment variables based on dcsapak's advice. This setup worked well for me:
Code:
export PBS_REPOSITORY=root@pam@<hostname|ip address>:8007:<backup datastore name>
export PBS_PASSWORD=<your password>
export PBS_FINGERPRINT=<retrieve from your PBS "Dashboard" by selecting "Show Fingerprint" and then "Copy">
Hope this helps!
 

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!