From ccdf7b7a4fbd08bbc6c439ae0253669238e382cf Mon Sep 17 00:00:00 2001 From: Gerard Bosch Date: Tue, 12 Dec 2023 15:32:04 +0100 Subject: [PATCH] feat: Turn the stats log into an opt-in --- README.md | 4 ++-- etc/restic/_global.env.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7078ba2..0c53aa2 100644 --- a/README.md +++ b/README.md @@ -442,9 +442,9 @@ To create a different backup and use you can do: # restic_backup.sh ``` -### Optional (enabled): Summary stats log +### Optional: Summary stats log -Enabled by default but can be disabled (opt-out) by setting its env variable empty: `RESTIC_BACKUP_STATS_DIR=` either on a specific profile, or on the global environment file (default: `$INSTALL_PREFIX/var/log/restic-automatic-backup-scheduler/`). +When enabled, it will write to a CSV log file the stats after each backup. Can be enabled by uncommenting its env variable (`RESTIC_BACKUP_STATS_DIR`) on the global environment file or defining it on a specific profile. The stats log (as well as) the desktop notifications incur in an additional run of `restic snapshots` and `restic diff`. This execution is shared with the notifications (no extra run). diff --git a/etc/restic/_global.env.sh b/etc/restic/_global.env.sh index 81df57e..390cd61 100644 --- a/etc/restic/_global.env.sh +++ b/etc/restic/_global.env.sh @@ -30,8 +30,8 @@ export RESTIC_BACKUP_EXTRA_ARGS= # Override this value in a profile if needed. export RESTIC_VERBOSITY_LEVEL=0 -# Backup summary stats log: snapshot size, etc. (empty/unset won't log) -export RESTIC_BACKUP_STATS_DIR="$INSTALL_PREFIX/var/log/restic-automatic-backup-scheduler" +# (optional, uncomment to enable) Backup summary stats log: snapshot size, etc. (empty/unset won't log) +#export RESTIC_BACKUP_STATS_DIR="$INSTALL_PREFIX/var/log/restic-automatic-backup-scheduler" # (optional) Desktop notifications. See README and restic_backup.sh for details on how to set this up (empty/unset means disabled) export RESTIC_BACKUP_NOTIFICATION_FILE=