瀏覽代碼

Mention "before_actions" command hook in soft failure documentation (#631).

Dan Helfman 2 年之前
父節點
當前提交
22c750b949
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md

+ 9 - 0
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
 configurable file, and proceeds onward to any other borgmatic configuration
 files you may have.
 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:
 You can imagine a similar check for the sometimes-online server case:
 
 
 ```yaml
 ```yaml
@@ -93,6 +96,12 @@ hooks:
 
 
 (Writing the battery script is left as an exercise to the reader.)
 (Writing the battery script is left as an exercise to the reader.)
 
 
+<span class="minilink minilink-addedin">New in version 1.7.0</span> 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
 ## Caveats and details