Add RESTIC_VERBOSITY_LEVEL

Fixes #50
This commit is contained in:
Erik Westrup
2022-02-01 16:19:05 +01:00
parent 341f3e79ec
commit f4b90c2499
4 changed files with 8 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Allow extra arguments to restic-backup with `$RESTIC_BACKUP_EXTRA_ARGS`.
- Add `$RESTIC_VERBOSITY_LEVEL` for debugging.
### Changed
- Align terminology used in README with the one used by B2 for credentials (keyId + applicationKey pair).

View File

@@ -22,3 +22,7 @@ export B2_CONNECTIONS=10
# Extra args to restic-backup. This is empty here and profiles can override this after sourcing this file.
export RESTIC_BACKUP_EXTRA_ARGS=
# Verbosity level from 0-3. 0 means no --verbose.
# Override this value in a profile if needed.
export RESTIC_VERBOSITY_LEVEL=0

View File

@@ -47,7 +47,7 @@ wait $!
# --one-file-system makes sure we only backup exactly those mounted file systems specified in $BACKUP_PATHS, and thus not directories like /dev, /sys etc.
# --tag lets us reference these backups later when doing restic-forget.
restic backup \
--verbose \
--verbose=$RESTIC_VERBOSITY_LEVEL \
--one-file-system \
--tag $BACKUP_TAG \
--option b2.connections=$B2_CONNECTIONS \
@@ -60,7 +60,7 @@ wait $!
# See restic-forget(1) or http://restic.readthedocs.io/en/latest/060_forget.html
# --group-by only the tag and path, and not by hostname. This is because I create a B2 Bucket per host, and if this hostname accidentially change some time, there would now be multiple backup sets.
restic forget \
--verbose \
--verbose=$RESTIC_VERBOSITY_LEVEL \
--tag $BACKUP_TAG \
--option b2.connections=$B2_CONNECTIONS \
--prune \

View File

@@ -23,5 +23,5 @@ trap exit_hook INT TERM
# Check repository for errors.
restic check \
--option b2.connections=$B2_CONNECTIONS \
--verbose &
--verbose=$RESTIC_VERBOSITY_LEVEL &
wait $!