initialize FAILED backup status

aiklimenko

New Member
Aug 24, 2023
6
0
1
Hello.
Have written script for checking backup status of VM via API - request for "https://pbs:8007/api2/json/nodes/localhost/tasks" with parsing Status of backup job.
The question is how to manually initialize FAILED backup status for VM in order to check script?
Was trying to set Read-only mode for PBS datastore but in this case the API still responds only earlier backups with OK status although email notification send status FAILED with reason "VM 101 qmp command 'backup' failed - backup connect failed: command error: datastore 'Backup_Folder' is in read-only maintenance mode:" but API doesn't show that.
 
The question is how to manually initialize FAILED backup status for VM in order to check script?
Did you try to run a backup job and then cancel the backup job while it is running?
What here always works is to let the backup job fail by adding some hardware to the VM that isn't available. Like a PCIe device that is already in use or disk passthrough of a disk that doesn't exist.