From 8bdbe41da0ed5cfe891baa44ec208e312f636049 Mon Sep 17 00:00:00 2001 From: lasimik Date: Mon, 17 May 2021 12:35:56 +0000 Subject: [PATCH] Update 'Readme.md' --- Readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 1216055..568af11 100644 --- a/Readme.md +++ b/Readme.md @@ -78,7 +78,7 @@ To know when the last complete backup was made, even if there is no connection t This example uses date and time of the last *complete* backup. Borgmatic does not supply this in a placeholder, so it is identified with `borgmatic list --successful --last 1`, returning only date and time (`--format {time}`) and without control characters (`--no-color `), then the header line is skipped (`sed -n 2p`), and the timezone (that the borgmatic return lacks) is appended (`date +'%:z'`). -It's a good idea to store this value together with the other files for that repository, so `/root/{repository}` would be nice. Unfortunately, `{repository}` is not resolved within borgmatic; the path must be manually copied from the top of the config file. +It's a good idea to store this value together with the other files for that repository, so `/root/{repository}` would be nice. Unfortunately, `{repository}` is not resolved within borgmatic; the path must be manually copied from the top of the config file and append to `/root/`. If an error occurs during backup, a script (here, `notify-error.sh`) will read that date and time and do the subsequent processing. @@ -92,7 +92,8 @@ location: ... hooks: after_backup: - - echo "$(borgmatic list --successful --last 1 --format {time} --no-color | sed -n 2p) $(date +'%:z')" \ + - echo "$(borgmatic list --successful --last 1 --format {time} --no-color \ + | sed -n 2p) $(date +'%:z')" \ > "/root/BackupUser@BackupServer:/path/to/repository/last-successful-backup" ... on_error: