Document work-around for colons in YAML strings (#708).

This commit is contained in:
Dan Helfman 2023-06-03 10:19:34 -07:00
parent 4f49b345af
commit caf654366c
2 changed files with 25 additions and 15 deletions

View file

@ -605,7 +605,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
before all the actions for each repository. before all the actions for each repository.
example: example:
- echo "Starting actions." - "echo Starting actions."
before_backup: before_backup:
type: array type: array
items: items:
@ -614,7 +614,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
before creating a backup, run once per repository. before creating a backup, run once per repository.
example: example:
- echo "Starting a backup." - "echo Starting a backup."
before_prune: before_prune:
type: array type: array
items: items:
@ -623,7 +623,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
before pruning, run once per repository. before pruning, run once per repository.
example: example:
- echo "Starting pruning." - "echo Starting pruning."
before_compact: before_compact:
type: array type: array
items: items:
@ -632,7 +632,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
before compaction, run once per repository. before compaction, run once per repository.
example: example:
- echo "Starting compaction." - "echo Starting compaction."
before_check: before_check:
type: array type: array
items: items:
@ -641,7 +641,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
before consistency checks, run once per repository. before consistency checks, run once per repository.
example: example:
- echo "Starting checks." - "echo Starting checks."
before_extract: before_extract:
type: array type: array
items: items:
@ -650,7 +650,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
before extracting a backup, run once per repository. before extracting a backup, run once per repository.
example: example:
- echo "Starting extracting." - "echo Starting extracting."
after_backup: after_backup:
type: array type: array
items: items:
@ -659,7 +659,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
after creating a backup, run once per repository. after creating a backup, run once per repository.
example: example:
- echo "Finished a backup." - "echo Finished a backup."
after_compact: after_compact:
type: array type: array
items: items:
@ -668,7 +668,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
after compaction, run once per repository. after compaction, run once per repository.
example: example:
- echo "Finished compaction." - "echo Finished compaction."
after_prune: after_prune:
type: array type: array
items: items:
@ -677,7 +677,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
after pruning, run once per repository. after pruning, run once per repository.
example: example:
- echo "Finished pruning." - "echo Finished pruning."
after_check: after_check:
type: array type: array
items: items:
@ -686,7 +686,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
after consistency checks, run once per repository. after consistency checks, run once per repository.
example: example:
- echo "Finished checks." - "echo Finished checks."
after_extract: after_extract:
type: array type: array
items: items:
@ -695,7 +695,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
after extracting a backup, run once per repository. after extracting a backup, run once per repository.
example: example:
- echo "Finished extracting." - "echo Finished extracting."
after_actions: after_actions:
type: array type: array
items: items:
@ -704,7 +704,7 @@ properties:
List of one or more shell commands or scripts to execute List of one or more shell commands or scripts to execute
after all actions for each repository. after all actions for each repository.
example: example:
- echo "Finished actions." - "echo Finished actions."
on_error: on_error:
type: array type: array
items: items:
@ -715,7 +715,7 @@ properties:
"compact", or "check" action or an associated before/after "compact", or "check" action or an associated before/after
hook. hook.
example: example:
- echo "Error during create/prune/compact/check." - "echo Error during create/prune/compact/check."
before_everything: before_everything:
type: array type: array
items: items:
@ -726,7 +726,7 @@ properties:
These are collected from all configuration files and then These are collected from all configuration files and then
run once before all of them (prior to all actions). run once before all of them (prior to all actions).
example: example:
- echo "Starting actions." - "echo Starting actions."
after_everything: after_everything:
type: array type: array
items: items:
@ -737,7 +737,7 @@ properties:
These are collected from all configuration files and then These are collected from all configuration files and then
run once after all of them (after any action). run once after all of them (after any action).
example: example:
- echo "Completed actions." - "echo Completed actions."
postgresql_databases: postgresql_databases:
type: array type: array
items: items:

View file

@ -28,6 +28,16 @@ hooks:
- umount /some/filesystem - umount /some/filesystem
``` ```
If your command contains a special YAML character such as a colon, you may
need to quote the entire string (or use a [multiline
string](https://yaml-multiline.info/)) to avoid an error:
```yaml
hooks:
before_backup:
- "echo Backup: start"
```
<span class="minilink minilink-addedin">New in version 1.6.0</span> The <span class="minilink minilink-addedin">New in version 1.6.0</span> The
`before_backup` and `after_backup` hooks each run once per repository in a `before_backup` and `after_backup` hooks each run once per repository in a
configuration file. `before_backup` hooks runs right before the `create` configuration file. `before_backup` hooks runs right before the `create`