Skip to content

Commit

Permalink
feat: Turn the stats log into an opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardbosch committed Dec 12, 2023
1 parent 07948fe commit ccdf7b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
4 changes: 2 additions & 2 deletions etc/restic/_global.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=

0 comments on commit ccdf7b7

Please sign in to comment.