From 22c750b94913c49b18c9429537d63e56712954da Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 25 Jan 2023 13:01:52 -0800 Subject: [PATCH] Mention "before_actions" command hook in soft failure documentation (#631). --- ...kup-to-a-removable-drive-or-an-intermittent-server.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md b/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md index 689284baa..0f5785517 100644 --- a/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md +++ b/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md @@ -68,6 +68,9 @@ borgmatic. borgmatic logs the soft failure, skips all further actions in that configurable file, and proceeds onward to any other borgmatic configuration files you may have. +Note that `before_backup` only runs on the `create` action. See below about +optionally using `before_actions` instead. + You can imagine a similar check for the sometimes-online server case: ```yaml @@ -93,6 +96,12 @@ hooks: (Writing the battery script is left as an exercise to the reader.) +New in version 1.7.0 The +`before_actions` and `after_actions` hooks run before/after all the actions +(like `create`, `prune`, etc.) for each repository. So if you'd like your soft +failure command hook to run regardless of action, consider using +`before_actions` instead of `before_backup`. + ## Caveats and details