Backup the PBS (VM) itself?

mhert

Well-Known Member
Jul 5, 2017
92
1
48
44
Hello everyone!

I have the problem that the backup of the VM with PBS constantly fails with the error:

INFO: creating Proxmox Backup Server archive 'vm/101/2023-04-14T06:01:12Z'
INFO: issuing guest-agent 'fs-freeze' command
INFO: issuing guest-agent 'fs-thaw' command
ERROR: VM 101 qmp command 'backup' failed - backup connect failed: command error: http request timed out

When we set up the environment the backup functions for some time, but then i changed the ip-adress of the backup storage (NAS) and reconfigured the storage in pbs and since then the backup fails ALWAYS.

BUT: The backup of the second VM on the same PVE is working!

Is this a chicken-egg problem or how can i backup the pbs itself?

1681453868767.png

Thanks in advance.
 
So your environment is: pbs vm with datatore via NFS?

your failed task: backup the pbs vm with pbs?
 
Yes. Backup the pbs vm with pbs (as i read this, it sounds weird, but before the ip-change of the nas, the backup functions...)

I think it is SMB/CIFS. Where can I see the type of the storage in the gui after the configuration? If I got to "Edit" on the Storage, there is no info shown about the selected protocoll...

1681459692363.png
 
Yes. Backup the pbs vm with pbs (as i read this, it sounds weird, but before the ip-change of the nas, the backup functions...)
Try to backup PBS using Vzdump to your NAS. PBS backing up itself doesn't really make sense. Lets say you screw up a update and PBS will crash when booting. How do you restore the backup of your PBS VM if that PBS needs to be fully working in order to restore anything?

I think it is SMB/CIFS. Where can I see the type of the storage in the gui after the configuration? If I got to "Edit" on the Storage, there is no info shown about the selected protocoll...
You would need to look on the PBS for the datastore, not in PVE. And you would need to use the CLI for that, as PBS doesn't officially support CIFS/NFS, as you should only use local storage, so its not implemented in the webUI.
 
  • Like
Reactions: Kingneutron
In order to safely backup a VM, its filesystem and its overall execution have to be suspended (fs-freeze).

What happens when you try to back up your virtualized PBS is that it itself gets frozen, and is thus unable to continue backing itself up.

Also, as per our documentation, we do not recommend setting up PBS in a VM:
Caution:
Installing the backup server directly on the hypervisor is not recommended. It is safer to use a separate physical server to store backups. Should the hypervisor server fail, you can still access the backups.

Of course, you can keep backing up all of your other VMs (except the PBS VM itself) if you just want to revert your VMs to a previous state on occasion, for example. Though, as Dunuin already mentioned, keep in mind that everything will be gone if the hardware of your PVE fails.
 
PBS appears to backup itself just fine when running in a container (using a separately bind-mounted non-virtual datastore). Do you need to run it in a VM?
 
In my case im also running pbs as a VM on the same host as the other VMs.
I think it does make sense in some scenarios. But correct me if im wrong.

For example in mine: In my homelab i have only my Windows desktop and my physical host.
The physical host is very powerful and has plenty of RAM. My desktop PC is running a second PBS instance as Virtualbox VM in case of emergency for restores. (never had that yet though).
But the desktop PC is not always running, and the server has enough RAM for backing up the 15 TB of VMs. Which is not the case for the desktop machine which has only 16 GB. It might be pretty slow.

Otherwise i would have to go and buy another machine and plenty of RAM just for PBS.

So running PBS as a VM makes sense to me right now. - Or am i wrong here?

The documentation says its not recommended because if the hypervisor fails also PBS VM is gone. But it does not say that it's not working.
If you have a second, smaller PBS it should be ok, right?
I could copy the config in etc to the smaller one every now and then, so it sees also the NFS datastore where the backups reside.
 
Last edited:
So running PBS as a VM makes sense to me right now. - Or am i wrong here?
I think that's really a bad practice even if it's work.....
but that's just me...
where are you backing up ? to a NAS ? External disk ? cloud ?
 
I would prefer to go like dunuin mentioned. Use the internal backup tool of PVE to backup the pbs vm to the smb-share.
 
  • Like
Reactions: Kingneutron
I had success executing the backup disabling the guest agent from the vm config.

I know this is not the perfect solution because the filesystem is not consistent but is good enough for my setup.

I want to backup pbs itself only because I run some monitoring scripts that get very angry if there isn't a recent verified backup for each VM. My DR plan is to bring up PVE, install a new PBS vm and attach the existing datastore, thus I'm not warried about the state of the filesystem.
 
I found a much easier solution than having a second PBS.
As Dunuin said above: Just use vzdump instead of pbs to backup pbs itself.
And in case of disaster just restore the PBS VM first and then all others.
Thats my current setup and i tested the restore-scenario, and it works fine.
 
  • Like
Reactions: Kingneutron
I have PBS as a VM in an LXD environment.

When backing up it's host, containers and VMs, it also backs up itself.

Is this bc of the LXD virtualization OR is it bc the backup contents are stored in a separate physical disk (available as a 2nd block device to PBS) from the one where PBS itself VM resides? Or neither, things have changed this post was last updated?
 

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!