HowTo restore a single file from Proxmox Backup Server (PBS)?

I daily backup my virtual Nethserver running under Proxmox Virtual Environment (PVE) to a Proxmox Backup Server (PBS). I tried to figure out howto restore a single file from my Backups.

Please test it and give us a feedback if it worked for you?

Login to your Proxmox PVE Server, the Name of my Storage under PVE is pbs01.

Edit:

Make sure libguestfs-tools are installed under Proxmox VE:

apt-get install libguestfs-tools

List all Backups:

proxmox-backup-client list --repository root@pam@<Proxmox-Backup-Server-IP>:8007:pbs01

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ group  β”‚ last snapshot               β”‚ backup-count β”‚ files                                                                                  β”‚
β•žβ•β•β•β•β•β•β•β•β•ͺ═════════════════════════════β•ͺ══════════════β•ͺ════════════════════════════════════════════════════════════════════════════════════════║
...
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ vm/104 β”‚ vm/104/2021-01-03T17:21:21Z β”‚           19 β”‚ client.log drive-scsi0.img fw.conf index.json qemu-server.conf                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
...

Map the Backup:

proxmox-backup-client map vm/104/2021-01-03T17:21:21Z drive-scsi0.img --repository root@pam@<Proxmox-Backup-Server-IP>:8007:pbs01

Get your device-name:

lsblk

NAME                                       MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0                                        7:0    0  250G  1 loop
β”œβ”€loop0p1                                  259:0    0    1G  1 part
└─loop0p2                                  259:1    0  249G  1 part

Scan VGs:

lvscan

...
inactive          '/dev/VolGroup/lv_root' [246.99 GiB] inherit
inactive          '/dev/VolGroup/lv_swap' [2.00 GiB] inherit

Change VGs to active:

vgchange -ay

...
2 logical volume(s) in volume group "VolGroup" now active

Scan VGs again:

lvscan

...
ACTIVE            '/dev/VolGroup/lv_root' [246.99 GiB] inherit
ACTIVE            '/dev/VolGroup/lv_swap' [2.00 GiB] inherit

Create mountpoint:

mkdir /media/snapshot

Mount it readonly with:

guestmount -m /dev/VolGroup/lv_root -r -a /dev/loop0p2 /media/snapshot/

Do what you have to do, e.g. list ibays :

ls -alih /media/snapshot/var/lib/nethserver/ibay

Unmount it with:

umount /media/snapshot/

Deactivate VolGroup:

vgchange -a n VolGroup
4 Likes

Will be tested - as soon as my next batch of hardware arrives…
PBS is running, but will be getting new disks…

:slight_smile:

My 2 cents
Andy

1 Like

Do you know the HPE ProLiant MicroServer Gen10 Plus ?

@fausp

Yes, I do. I have three clients using the Microserver Gen10.
RAM max is now 32 GB, before, on the Gen8 was 16 GB RAM.
The Gen10 has no IMPI, Gen 8 had a usable IPMI.

Nice and quiet boxes…

On mi Promox VE 6.3-4,

After mapping of mi save,
root@node1:~# proxmox-backup-client map vm/100/2021-03-18T11:00:01Z drive-scsi0.img --repository root@pam@192.168.1.10:8007:GDiskBackup
Image β€˜root@pam@192.168.1.10:8007:GDiskBackup:vm/100/2021-03-18T11:00:01Z/drive-scsi0.img’ mapped on /dev/loop0
root@node1:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
*loop0 7:0 0 20G 1 loop *
*β”œβ”€loop0p1 259:0 0 18G 1 part *
└─loop0p2 259:1 0 1K 1 part

i scan VGs and i don’t find lv_root or lv_swap
root@node1:~# lvscan

  • ACTIVE β€˜/dev/ceph-0981a7a5-be80-4006-9128-210395b5572a/osd-db-77b23226-23c9-4a53-9407-cecdca381fb8’ [186.30 GiB] inherit*
  • ACTIVE β€˜/dev/pve/swap’ [32.00 GiB] inherit*
  • ACTIVE β€˜/dev/pve/root’ [96.00 GiB] inherit*
  • ACTIVE β€˜/dev/pve/data’ [<283.71 GiB] inherit*
  • ACTIVE β€˜/dev/pve/vm-101-disk-0’ [4.00 MiB] inherit*
  • ACTIVE β€˜/dev/ceph-a79b5f26-3185-46f8-a30e-41456588d2bd/osd-block-651d2a15-afd9-4af0-81a6-db11988ffba0’ [<1.82 TiB] inherit*
  • ACTIVE β€˜/dev/ceph-1d08180b-ef50-4c97-97bf-461a50a7f0f6/osd-block-10536439-fa7f-494f-bab8-0995a77d696f’ [<1.82 TiB] inherit*
  • ACTIVE β€˜/dev/ceph-37490a0e-25a0-4c28-ba52-335d8f177822/osd-block-779d0203-43f0-4bcd-9f9b-7bcae577e13f’ [<1.82 TiB] inherit*

it doesn’t work for me.

Is there a missing step?

Hello lira_rospionne and welcome to the nethserver-community!

Usually at this point you should see inactive VGs e.g.:

The next step would be to activate it all with:

You then should do these steps:

Don’t forget to install the libguestfs-tools to be able to guestmount…

edit:
Tried it on a PVE 6.3-6

1 Like

Is there some one who have tried to install this backup client GitHub - sg4r/proxmox-backup-client: CentOS 7 or CentOS 8 Client for Proxmox Backup Server?
And make it work, then I would like some tips :innocent:

Michael

Tried to install it with:

yum install https://github.com/sg4r/proxmox-backup-client/releases/download/v1.0.11/proxmox-backup-1.0.11-2.x86_64.el7.rpm

yum install sg3_utils

But I have not tested it yet…

Edit:
Wouldn’t it be cool to get it under the Nethserver GUI?

3 Likes

Proxmox 6.4 is out and brings us single-file restore:

3 Likes

yes testing right now… and it also works :partying_face:

well, seems to work with windows VM (ntfs), ubuntu (ext4) but not with nethserver standard install (maybe problem with lvm? :thinking: )
I’ll do some other tests…

2 Likes

I got this error:


Maybe xfs is the reason?

it seems it’s LVM:
https://lists.proxmox.com/pipermail/pve-user/2021-April/172556.html

but I have also a VM with xfs data disk (without partition) and can not access to it, i should try an xfs disk with one partition

Looks like a BUG: proxmox-backup-file restore cannot mount xfs

1 Like

fixed :+1: it works now (but only if at least 1 partition is detected)

1 Like

It looks like Proxmox Web interface for Single File Restore hasn’t got national language symbols support at all :frowning: NTFS, can’t see cyrillic file names or directories. Very sad and frustrating.

proxmox-backup-client map and guestmount shows cyrillic names OK.

@EAnsy

Hi

Welcome to the NethServer forum!

As said, this is the NethServer Forum. I don’t quite see what Proxmox Backup Server together with NTFS language support (For Windows) has to do with NethServer?

A lot of people here do use Proxmox and also PBS, myself included, but if you have any requests about PBS, it would be better to go to the PBS forum…

PBS itself does support russian (and cyrillic), as I can see on my home node…

Maybe not yet 100%, but that is more likely due to a lack of contributions by cyrillic language speakers… There are a lot of languages, but I also do not see serbo-croatic, another also cyrillic language…
It’s open source! Don’t bitch about it, but contribute if you can! And if you need cyrillic, you can! :slight_smile:

My 2 cents
Andy

2 Likes