|
@@ -83,7 +83,7 @@ tests](https://torsion.org/borgmatic/docs/how-to/extract-a-backup/).
|
|
|
|
|
|
## Error hooks
|
|
## Error hooks
|
|
|
|
|
|
-When an error occurs during a `prune`, `compact`, `create`, or `check` action,
|
|
|
|
|
|
+When an error occurs during a `create`, `prune`, `compact`, or `check` action,
|
|
borgmatic can run configurable shell commands to fire off custom error
|
|
borgmatic can run configurable shell commands to fire off custom error
|
|
notifications or take other actions, so you can get alerted as soon as
|
|
notifications or take other actions, so you can get alerted as soon as
|
|
something goes wrong. Here's a not-so-useful example:
|
|
something goes wrong. Here's a not-so-useful example:
|
|
@@ -116,8 +116,8 @@ the repository. Here's the full set of supported variables you can use here:
|
|
* `output`: output of the command that failed (may be blank if an error
|
|
* `output`: output of the command that failed (may be blank if an error
|
|
occurred without running a command)
|
|
occurred without running a command)
|
|
|
|
|
|
-Note that borgmatic runs the `on_error` hooks only for `prune`, `compact`,
|
|
|
|
-`create`, or `check` actions or hooks in which an error occurs, and not other
|
|
|
|
|
|
+Note that borgmatic runs the `on_error` hooks only for `create`, `prune`,
|
|
|
|
+`compact`, or `check` actions or hooks in which an error occurs, and not other
|
|
actions. borgmatic does not run `on_error` hooks if an error occurs within a
|
|
actions. borgmatic does not run `on_error` hooks if an error occurs within a
|
|
`before_everything` or `after_everything` hook. For more about hooks, see the
|
|
`before_everything` or `after_everything` hook. For more about hooks, see the
|
|
[borgmatic hooks
|
|
[borgmatic hooks
|
|
@@ -144,7 +144,7 @@ With this hook in place, borgmatic pings your Healthchecks project when a
|
|
backup begins, ends, or errors. Specifically, after the <a
|
|
backup begins, ends, or errors. Specifically, after the <a
|
|
href="https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/">`before_backup`
|
|
href="https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/">`before_backup`
|
|
hooks</a> run, borgmatic lets Healthchecks know that it has started if any of
|
|
hooks</a> run, borgmatic lets Healthchecks know that it has started if any of
|
|
-the `prune`, `compact`, `create`, or `check` actions are run.
|
|
|
|
|
|
+the `create`, `prune`, `compact`, or `check` actions are run.
|
|
|
|
|
|
Then, if the actions complete successfully, borgmatic notifies Healthchecks of
|
|
Then, if the actions complete successfully, borgmatic notifies Healthchecks of
|
|
the success after the `after_backup` hooks run, and includes borgmatic logs in
|
|
the success after the `after_backup` hooks run, and includes borgmatic logs in
|
|
@@ -154,8 +154,8 @@ in the Healthchecks UI, although be aware that Healthchecks currently has a
|
|
|
|
|
|
If an error occurs during any action or hook, borgmatic notifies Healthchecks
|
|
If an error occurs during any action or hook, borgmatic notifies Healthchecks
|
|
after the `on_error` hooks run, also tacking on logs including the error
|
|
after the `on_error` hooks run, also tacking on logs including the error
|
|
-itself. But the logs are only included for errors that occur when a `prune`,
|
|
|
|
-`compact`, `create`, or `check` action is run.
|
|
|
|
|
|
+itself. But the logs are only included for errors that occur when a `create`,
|
|
|
|
+`prune`, `compact`, or `check` action is run.
|
|
|
|
|
|
You can customize the verbosity of the logs that are sent to Healthchecks with
|
|
You can customize the verbosity of the logs that are sent to Healthchecks with
|
|
borgmatic's `--monitoring-verbosity` flag. The `--list` and `--stats` flags
|
|
borgmatic's `--monitoring-verbosity` flag. The `--list` and `--stats` flags
|