PBS as a VM

cyruspy

Renowned Member
Jul 2, 2013
73
2
73
Hello!,

As part of a little lab, I have two PVE servers that I would like to setup in a 2-nodes cluster. I have a third node that has a lot of resources that would be probably wasted with PBS (it's similar to the first two nodes). Anyhow, with PVE or PBS, I plan to run QDevice on the third node for the 2-nodes cluster.

Given:
- I need backups for the VMs running on the other 2 nodes
- I want to be able to restore everything if the two main nodes are dead
- I would like to run some test VMs on the third server, knowing HA is not an option for them.

I would like to setup PVE also on the 3rd node, but outside of the main cluster to not depend on quorum and deploy PBS as a VM. Do you see any issue with that?, is there any other alternative?, something like installing PBS on a PVE host directly?

Any recomendation for that scenario?.
 
Last edited:
PBS in a (privileged?) LXC with bind-mounts should also work.

Depends on how your storage (for the PBS datastores) looks like and how you want/can attach/access it.
 
PBS in a (privileged?) LXC with bind-mounts should also work.

Depends on how your storage (for the PBS datastores) looks like and how you want/can attach/access it.
For the third physical node, I have 2x1TB SSD + 3 or 4 x 300GB mechanical disks...
 
My thoughts on this. I would also be happy for feedback from others. :)

PBS on PVE-Host:
Easiest/Simplest setup. Direct access to the datastores. No further setup required.
But: Every two years when a new major PVE-version comes out based on the new Debian-version, you have to wait with the upgrade until the next major PBS-version gets released too. Not that of a deal breaker, but might be keeped in mind. Also best-practice should still be: "No extra services on the host itself, right!?" ;)
I have this method actually running on two machines since PVE6 and PBS1 until now without any issues. But with the next fresh installation, the PBS most likely will be in a LXC because of the above mentioned.

PBS in a LXC:
Also direct access to the datastores with bind-mounts. Some separation from the host, so both can be updated/upgraded independently. Host stays "clean".
Only thing I have to figure out is, how much action it maybe needs with a unprivileged container because of the permissions. But probably I don't follow the best-practices in this case and go with a privileged one. Should still be better than directly on the host. :D

PBS in a VM:
No direct access out of the box. So you either need to use vdisks or "qm set"-passthrough of your disks or PCIe-passthrough the disks (e.g. nvme) or the whole storage controller. The former two I personally would not consider. (Heared of situations where the "qm set"-passthrough disks worked fine in the initial VM, but not in another (new) one. I wouldn't trust this for my backups...)
So the only way I personally would use a VM (and I am a fan of VMs rather than LXCs) for the PBS would be, if I can PCIe-passthrough the storage for the datastores to the VM (and I don't want to use it for anything else too).
 
  • Like
Reactions: Whitterquick
My thoughts on this. I would also be happy for feedback from others. :)

PBS on PVE-Host:
Easiest/Simplest setup. Direct access to the datastores. No further setup required.
But: Every two years when a new major PVE-version comes out based on the new Debian-version, you have to wait with the upgrade until the next major PBS-version gets released too. Not that of a deal breaker, but might be keeped in mind. Also best-practice should still be: "No extra services on the host itself, right!?" ;)
I have this method actually running on two machines since PVE6 and PBS1 until now without any issues. But with the next fresh installation, the PBS most likely will be in a LXC because of the above mentioned.
Would be nice to hear what the staff can say about releases. Atleast with PVE7 there was also a PBS2 release within some weeks so last time upgrading both at the same time wasn't a big problem.
PBS in a LXC:
Also direct access to the datastores with bind-mounts. Some separation from the host, so both can be updated/upgraded independently. Host stays "clean".
Only thing I have to figure out is, how much action it maybe needs with a unprivileged container because of the permissions. But probably I don't follow the best-practices in this case and go with a privileged one. Should still be better than directly on the host. :D
I also think this combines the benefits of bare metal and VM. Just a bit annoying to setup user remapping in an unprivileged LXC. And privileged LXCs are even worse now with PVE7 because the new systemd of Debian 11 now wants access to /dev and /proc and its not the best idea to give a privileged LXC access to those.
PBS in a VM:
No direct access out of the box. So you either need to use vdisks or "qm set"-passthrough of your disks or PCIe-passthrough the disks (e.g. nvme) or the whole storage controller. The former two I personally would not consider. (Heared of situations where the "qm set"-passthrough disks worked fine in the initial VM, but not in another (new) one. I wouldn't trust this for my backups...)
So the only way I personally would use a VM (and I am a fan of VMs rather than LXCs) for the PBS would be, if I can PCIe-passthrough the storage for the datastores to the VM (and I don't want to use it for anything else too).
Not that I would recommend using a NFS/SMB share as a datastore but works absolutely fine here in the homelab if you can life with the bad performance.
 
Thanks for your feedback. :)

Not that I would recommend using a NFS/SMB share as a datastore but works absolutely fine here in the homelab if you can life with the bad performance.

But that would need a SMB/NFS-server, which either has to be installed right on the PVE-host or in an additional LXC with bind-mounts.
Therefore you also could directly install PBS on the host or in a LXC. Only benefit I see with this would be, that you don't have the "upgrade-wait-time" and a approximately smaller footprint of the SMB/NFS-server compared to the PBS (my assumption! no knowledge).
But on the other hand we get the additional network layer in between.
 
Last edited:
I'm going to hang in the back here. My project also provides 3 similar hosts. Two of them even have the same storage. Two small Intel SSD's, 2 large Intel SSD's and 2 large spinning server hard drives. The two will definitely be a Proxmox cluster. However, I am wavering just like the thread creator what exactly I am doing with the 3rd host. Which of the variants discussed so far would be closest to best practice?
 
To run both bare metal, install a PVE and then add the proxmox-backup-server package. However, PBS in a virtual machine works as well.
PBS with bind-mounts in a (privileged?) LXC should also function.

It depends on how you want to attach/access your storage (for the PBS datastores) and how you want to attach/access it. I read all of the information on this tech site, AJDpark Visit, and I'm interested in learning more. Thanks
I’m personally still wondering which way I should go. Bare Metal on same host as secondary server is the way I’m leaning but should really have nothing installed on host. Maybe I will try an LXC…
 
(Heared of situations where the "qm set"-passthrough disks worked fine in the initial VM, but not in another (new) one. I wouldn't trust this for my backups...)

Newbie question here, but I was thinking of installing PBS in a VM (home user) and passthrough the backup disk to it exactly because then if the PVE hardware crashes, I can be sure that the PBS backup disk can be reused if I reinstall PBS and attach the backup disk to it, because it was 100% handled by the PBS VM, not by PVE, and I'd be safe.

So am I wrong in this assumption?
 
Newbie question here, but I was thinking of installing PBS in a VM (home user) and passthrough the backup disk to it exactly because then if the PVE hardware crashes, I can be sure that the PBS backup disk can be reused if I reinstall PBS and attach the backup disk to it, because it was 100% handled by the PBS VM, not by PVE, and I'd be safe.

So am I wrong in this assumption?
Disk passthrough is no physical passthrough. The PBS VM still uses a virtual disk and the physical disk is handled by PVE. If you want that the PBS VM uses the physical disk, you would need to buy a HBA card and use PCI passthrough to passthough the whole HBA, with all of its ports, in to the PBS VM.
But a dedicated disk for PBS is still not a bad idea, even if it is handled by PVE, because that way, when losing the system disk or VM storage disk, you will at least not lose your backups at the same time (except of cause you got a power outage, kernel crash, hardware failure or whatever that will corrupt data on all disks at the same time because for example cached writes in RAM will be lost...so make sure not to disable sync writes...).
 
Last edited:
Thanks @Dunuin. I wonder what is the recommended setup-for-dummies in my case here? I only have one hardware, so PBS needs to be in same hardware as PVE. I have a spare 1TB M2 disk that I will use exclusively for the backup disk.

Is instaling PBS in a VM the best option? Then, what kind of disk setup is safer so that I can reuse the disk in a new setup if a crash happens?

1. I think first option is adding the spare disk as a storage in PVE (storage of what type), create a virtual hard disk for PBS in such storage and then inside PBS add such disk as storage as well (Disk storage, not ZFS)? Is this safe?

2. Second option would be disk passthrough to PBS, but since you said it's not 100% safe, would I gain anything by doing so? If yes, then I should also create a storage inside PBS, still as disk storage (not ZFS)?

As I understand, any ZFS in PBS would be overkill for me?
 
Is instaling PBS in a VM the best option? Then, what kind of disk setup is safer so that I can reuse the disk in a new setup if a crash happens?
I think there is nothing you can do to make the PBS backups safer without another host, except for maybe buying a USB SSD that you only connect once per week/month or so to your PBS VM, so it is probably disconnected and safe when the crash happens. You could then create a second datastore on it and do a local sync from the datastore on the M.2 SSD to the datastore on the external SSD. And then store that external SSDs somewhere offsite (for example at work) where you can easily access it.

Renting a (virtual) server in a datacenter and running an additional offsite PBS (or renting a PBS server like for example Tuxis offers) of cause would be the best option. But then you get additional costs each month.
 
Last edited:
I think there is nothing you can do to make the PBS backups safer without another host, except for maybe buying a USB SSD that you only connect once per week/month or so to your PBS VM
Hm, I thought PBS had a feature to do sync to external storage, like a cloud storage?
 

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!