Unable to set protected flag on backups until backup is verified

Programster

Member
Jul 8, 2023
11
2
8
United Kingdom
Hey there,

I have found that i can't create a backup with the "protected" flag enabled. This is with a user that only has the `Datastore.Backup` role assigned to them. These requests will fail (but backup still taken) as shown below:


Selection_012.png


If I manually click the button to "Change Protection" immediately after the backup is taken, I still get an error message with the request failing.

Selection_013.png

However, if I refresh the page, and the backup shows up as having been verified (I have the backup server configured to automatically verify new backups), then the change protection request will go through, suggesting to me that this is not actually a permissions issue?

Is there something I need to do to allow my proxmox server to create protected backups at the point of taking the backup? With regards to permissions, I've deliberately set up the user such that they are not a backup admin, so they do not have permission to prune the backups.
 
HI,
Hey there,

I have found that i can't create a backup with the "protected" flag enabled. This is with a user that only has the `Datastore.Backup` role assigned to them. These requests will fail (but backup still taken) as shown below:
Did you already check the systemd journal of the PBS host for errors? From a permission point of view, setting the protected flag is possible with Datastore.Backup if the user is the owner of the backup group the snapshot belongs to.

View attachment 86948

If I manually click the button to "Change Protection" immediately after the backup is taken, I still get an error message with the request failing.
Bad request might rather indicate that the client is sending some unexpected request data. What is your pveversion -v? What version is used on the PBS? proxmox-backup-manager version --verbose will tell you more.

View attachment 86949

However, if I refresh the page, and the backup shows up as having been verified (I have the backup server configured to automatically verify new backups), then the change protection request will go through, suggesting to me that this is not actually a permissions issue?

Is there something I need to do to allow my proxmox server to create protected backups at the point of taking the backup? With regards to permissions, I've deliberately set up the user such that they are not a backup admin, so they do not have permission to prune the backups.
Yes, this does not seem like a permission issue. As stated, a user with Datastore.Backup permission which is owner of the backup group is allowed to set the protected flag on the snapshots.
 
Probably https://bugzilla.proxmox.com/show_bug.cgi?id=4289, as you have both "Verify New" enabled and try to create backups with "protected" enabled.
Thanks! I just tested disabling un-ticking the verify new option, and now the backups/protection mode works as expected. For now, I will just have this option unticked, as being able to mark the backups as protected at the point of taking the backup is more important, and I can just have the verification jobs run every 30 mins.