backrest icon indicating copy to clipboard operation
backrest copied to clipboard

Cancelled task (ON_ERROR_CANCEL hook) is displayed as failed task

Open chrstphmr opened this issue 9 months ago • 1 comments

For backups on a laptop, I'm using a CONDITION_SNAPSHOT_START hook with ping -c 1 to check if the SFTP host is reachable and cancel the backup otherwise. This cancels the job (as intended) but results to an inconsistent error signalling in the UI.

To Reproduce

  1. Create command hook that exits non-zero (e.g. /bin/false): CONDITION_SNAPSHOT_START and ON_ERROR_CANCEL
  2. Backup now.

Expected behavior The task should show up as cancelled in the entire web UI.

This works as expected in the list view. In the tree view and side pane, however, it shows up as error/exclamation mark. This seemingly wrong state can be fixed by clicking on 'Clear error history', which flips the state of this task switches from error to cancelled.

Platform Info

  • Linux amd64
  • Backrest Version 1.7.2@b885f1ec9e43e4bfe8f4f6f02bda83f5e7d88574

chrstphmr avatar Mar 03 '25 03:03 chrstphmr

Thanks for the report on this, I believe this should be fixed in the latest version of backrest.

garethgeorge avatar Apr 09 '25 07:04 garethgeorge