[SOLVED] Re-verify with API doesn't work

biowan1

New Member
Sep 11, 2025
5
3
3
Hello,

For several days I have been trying to use the PBS API to perform a selective re-verify for snapshots whose verify status is expiring. However, due to processing constraints, we will not be able to run this every day as mentioned in my previous post.

As far as I understand, it is not possible to perform a selective re-verify — meaning targeting a specific snapshot of a given VM for a given day — using the proxmox-backup-client command. Since this operation can be done from the web UI, I assumed that using the API would be the only way to automate it.

Unfortunately, I have not been able to get it working. The API call does not return a failure message, which gives the impression that the task was executed, but in reality the checkmark remains yellow.

Here is the command I am using.

Bash:
curl -k -X POST -H "$auth" \
  -d "backup-type=vm" \
  -d "backup-id=267" \
  -d "backup-time=1769817643" \
  -d "ns=prod" \
  https://pbs:8007/api2/json/admin/datastore/ds21/verify

And the returned message.
Bash:
{"data":"UPID:pbs:0000045A:0000038A:00003D9E:69A983AF:verify_snapshot:ds21\\x3ans-prod-vm-267-697D462B:backup@pbs!backup:"}

Thank you for your help.
 
  • Like
Reactions: Puliper
The API call does not return a failure message, which gives the impression that the task was executed, but in reality the checkmark remains yellow.
Short of authentication, permission, or syntax error the API calls do not return failures. The task can be long running and the fact that you submitted it is not a success yet. You need to query task status to determine its state.

A quick check in GUI should also tell you what happened to the task if anything.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
@bbgeek17
Thank you for your reply

You're right, can check in task list, the job is skipped (recenlty verified). It means the job was executed but it didn't re-verify.
I tried with the option ignore-verified=true, but it is still skipped.
I added more with the option outdated-after=30, the job is running in re-verify !!

YES ! the checkmark is green !

Thank you :)

Solution:
Bash:
curl -k -X POST -H "$auth" \
  -d "backup-type=vm" \
  -d "backup-id=267" \
  -d "backup-time=1769817643" \
  -d "ns=prod" \
  -d "ignore-verified=true" \
  -d "outdated-after=30" \
  https://pbs:8007/api2/json/admin/datastore/ds21/verify
 
Last edited:
Check the task list or GUI to confirm status; API submission alone doesn’t guarantee it ran.
If someone is submitting a request via API they might as well use API to query the task status ;-)
pvesh get /nodes/$NODE/tasks --output-format json| jq -r '[.[] | select(.type == "clusterjoin")] | sort_by(.endtime) | .[-1] | .status'


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: Onslow