Code:
root@pve:~# proxmox-backup-client mount vm/100/2020-10-16T22:45:02Z pbsbackuplocal /mnt/vnsnap0
Error: unable to get (default) repository
root@pve:~#
From the pve command line.
root@pve:~# proxmox-backup-client mount vm/100/2020-10-16T22:45:02Z pbsbackuplocal /mnt/vnsnap0
Error: unable to get (default) repository
root@pve:~#
--repository <repository_url>
string.proxmox-backup-client map <snapshot> <archive-name> --repository <repository_url>
root@pve:~# proxmox-backup-client map vm/100/2020-10-16T22:45:02Z pbsbackuplocal --repository "root@pam@pveserver.bjsystems.co.uk:pbsbackuplocal"
Password for "root@pam": ********
Error: Can only mount/map pxar archives and drive images.
root@pve:~#
$ proxmox-backup-client map vm/123/2020-11-11T14:16:36Z drive-scsi0.img --repository test@pbs@localhost:backuptest
Password for "test@pbs": ******
Image 'test@pbs@localhost:8007:backuptest:vm/123/2020-11-11T14:16:36Z/drive-scsi0.img' mapped on /dev/loop0
root@pve:~# proxmox-backup-client map vm/100/2020-10-16T22:45:02Z drive-virtio0.img --repository "root@pam@192.168.100.98:pbsbackuplocal"
Password for "root@pam": ********
Image 'root@pam@192.168.100.98:8007:pbsbackuplocal:vm/100/2020-10-16T22:45:02Z/drive-virtio0.img' mapped on /dev/loop0
root@pve:~# mount /dev/loop0 /mnt/vzsnap0
mount: /mnt/vzsnap0: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
r
You are almost there... So the VM image will have partitions on them, so what you want is to mount the filesystem present on the partition, not the block device. The map command should create a loop device for each partition. Let me show by an example, I have the following VM backup:Progress! Now i've got the image mapped, how can I access it from the command line?
I've tried mount:
Code:root@pve:~# proxmox-backup-client map vm/100/2020-10-16T22:45:02Z drive-virtio0.img --repository "root@pam@192.168.100.98:pbsbackuplocal" Password for "root@pam": ******** Image 'root@pam@192.168.100.98:8007:pbsbackuplocal:vm/100/2020-10-16T22:45:02Z/drive-virtio0.img' mapped on /dev/loop0 root@pve:~# mount /dev/loop0 /mnt/vzsnap0 mount: /mnt/vzsnap0: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error. r
# proxmox-backup-client list --repository local:store
┌───────────────┬────────────────────────────────────┬──────────────┬────────────────────────────────────────────────────────────────┐
│ group │ last snapshot │ backup-count │ files │
╞═══════════════╪════════════════════════════════════╪══════════════╪════════════════════════════════════════════════════════════════╡
│ vm/102 │ vm/102/2020-11-25T11:00:44Z │ 6 │ client.log drive-scsi0.img fw.conf index.json qemu-server.conf │
└───────────────┴────────────────────────────────────┴──────────────┴────────────────────────────────────────────────────────────────┘
# proxmox-backup-client map vm/102/2020-11-25T11:00:44Z drive-scsi0.img --repository local:store
Image 'local:store:vm/102/2020-11-25T11:00:44Z/drive-scsi0.img' mapped on /dev/loop0
# ls /dev/loop0*
/dev/loop0 /dev/loop0p1
# mount -t ext4 -o ro /dev/loop0p1 /mnt/mountpoint
# ls /mnt/mountpoint
bin boot dev etc home lib lib64 lost+found mnt opt proc root run sbin srv sys tmp usr var
root@pve:~# ls /dev/loop0*
/dev/loop0 /dev/loop0p1 /dev/loop0p2
root@pve:~# mount /dev/loop0p2 /mnt/vzsnap0
mount: /mnt/vzsnap0: unknown filesystem type 'LVM2_member'.
root@pve:~# mount -t ext4 /dev/loop0p2 /mnt/vzsnap0
mount: /mnt/vzsnap0: wrong fs type, bad option, bad superblock on /dev/loop0p2, missing codepage or helper program, or other error.
root@pve:~# mount /dev/loop0p1 /mnt/vzsnap0
mount: /mnt/vzsnap0: unknown filesystem type 'linux_raid_member'.
root@pve:~#
mdadm --examine /dev/loop0
and follow this procedure in order to try to mount https://serverfault.com/questions/383362/mount-unknown-filesystem-type-linux-raid-member/383373root@pve:~# mdadm /dev/loop0
/dev/loop0: is not an md array
root@pve:~# mdadm /dev/loop0p1
/dev/loop0p1: is not an md array
/dev/loop0p1: device 0 in 2 device inactive raid1 array. Use mdadm --examine for more detail.
root@pve:~# mdadm /dev/loop0p2
/dev/loop0p2: is not an md array
root@pve:~#
You are missing theThanks for your help.
The VM is a server running in a degraded raid mode (only one disc). It is an smeserver based on Centos 6 (yes I know it is EOL) and the installation when done did not give the option for a non raid install (or at least I did not find it!).
Just looked at your link. Phew! not sure I want to create an mdadm raind array for it on the pve, sounds very dangerous. This is my main server and quite precious to me!
Code:root@pve:~# mdadm /dev/loop0 /dev/loop0: is not an md array root@pve:~# mdadm /dev/loop0p1 /dev/loop0p1: is not an md array /dev/loop0p1: device 0 in 2 device inactive raid1 array. Use mdadm --examine for more detail. root@pve:~# mdadm /dev/loop0p2 /dev/loop0p2: is not an md array root@pve:~#
--examine
flag... The thing is that you are operating on a backup in readonly mode, so from that point of view you are safe.root@pve:~# mdadm --examine /dev/loop0
/dev/loop0:
MBR Magic : aa55
Partition[0] : 512000 sectors at 2048 (type fd)
Partition[1] : 3774359552 sectors at 514048 (type 8e)
root@pve:~#
root@pve:~# proxmox-backup-client map vm/103/2021-02-19T16:27:42Z drive-scsi0.img --repository "root@pam@192.168.100.98:pbsbackuplocal"
Password for "root@pam": ********
Image 'root@pam@192.168.100.98:8007:pbsbackuplocal:vm/103/2021-02-19T16:27:42Z/drive-scsi0.img' mapped on /dev/loop0
Disk /dev/loop0: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0001a1f8
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 2048 1027606527 1027604480 490G 83 Linux
/dev/loop0p2 1027606528 1035995135 8388608 4G 82 Linux swap / Solaris
root@pve:~# mkdir -p /mnt/mountpoint
root@pve:~# mount -t ext4 -o ro /dev/loop0p1 /mnt/mountpoint
mount: /mnt/mountpoint: cannot mount /dev/loop0p1 read-only.
perhaps your filesystem has a dirty log, try with norecoveryok, So I've re-worked that VM (and updated it to Centos 7), it is now Ext4:
Code:root@pve:~# proxmox-backup-client map vm/103/2021-02-19T16:27:42Z drive-scsi0.img --repository "root@pam@192.168.100.98:pbsbackuplocal" Password for "root@pam": ******** Image 'root@pam@192.168.100.98:8007:pbsbackuplocal:vm/103/2021-02-19T16:27:42Z/drive-scsi0.img' mapped on /dev/loop0 Disk /dev/loop0: 500 GiB, 536870912000 bytes, 1048576000 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x0001a1f8 Device Boot Start End Sectors Size Id Type /dev/loop0p1 * 2048 1027606527 1027604480 490G 83 Linux /dev/loop0p2 1027606528 1035995135 8388608 4G 82 Linux swap / Solaris root@pve:~# mkdir -p /mnt/mountpoint root@pve:~# mount -t ext4 -o ro /dev/loop0p1 /mnt/mountpoint mount: /mnt/mountpoint: cannot mount /dev/loop0p1 read-only.
As you can see it still won't mount it.
Hi,perhaps your filesystem has a dirty log, try with norecovery
mount -t ext4 -o ro,norecovery /dev/loop0p1 /mnt/mountpoint