Allow extra args to restic-backup with RESTIC_BACKUP_EXTRA_ARGS
Fixes #56
This commit is contained in:
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- Allow extra arguments to restic-backup with `$RESTIC_BACKUP_EXTRA_ARGS`.
|
||||
|
||||
### Changed
|
||||
- Align terminology used in README with the one used by B2 for credentials (keyId + applicationKey pair).
|
||||
|
||||
|
||||
@@ -19,3 +19,6 @@ export B2_ACCOUNT_KEY="<b2-application-key>" # TODO fill with your applicationKe
|
||||
|
||||
# How many network connections to set up to B2. Default is 5.
|
||||
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=
|
||||
|
||||
@@ -32,3 +32,9 @@ export RETENTION_DAYS=14
|
||||
export RETENTION_WEEKS=16
|
||||
export RETENTION_MONTHS=18
|
||||
export RETENTION_YEARS=3
|
||||
|
||||
# Optional extra arguments to restic-backup.
|
||||
# Example: Add two additional exclude files to the global one in RESTIC_PASSWORD_FILE.
|
||||
#RESTIC_BACKUP_EXTRA_ARGS="--exclude-file /path/to/extra/exclude/file/a /path/to/extra/exclude/file/b"
|
||||
# Example: exclude all directories that have a .git/ directory inside it.
|
||||
#RESTIC_BACKUP_EXTRA_ARGS="--exclude-if-present .git"
|
||||
|
||||
@@ -52,6 +52,7 @@ restic backup \
|
||||
--tag $BACKUP_TAG \
|
||||
--option b2.connections=$B2_CONNECTIONS \
|
||||
$exclusion_args \
|
||||
$RESTIC_BACKUP_EXTRA_ARGS \
|
||||
$BACKUP_PATHS &
|
||||
wait $!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user