diff --git a/usr/local/sbin/restic_backup.sh b/usr/local/sbin/restic_backup.sh index 8e86dd4..d1acb4c 100644 --- a/usr/local/sbin/restic_backup.sh +++ b/usr/local/sbin/restic_backup.sh @@ -31,6 +31,8 @@ BACKUP_TAG=systemd.timer # B2_ACCOUNT_ID, B2_ACCOUNT_KEY, RESTIC_REPOSITORY etc. source /etc/restic/b2_env.sh +# How many network connections to set up to B2. Default is 5. +B2_CONNECTIONS=50 # NOTE start all commands in background and wait for them to finish. # Reason: bash ignores any signals while child process is executing and thus my trap exit hook is not triggered. @@ -49,6 +51,7 @@ restic backup \ --verbose \ --one-file-system \ --tag $BACKUP_TAG \ + --option b2.connections=$B2_CONNECTIONS \ $BACKUP_EXCLUDES \ $BACKUP_PATHS & wait $! @@ -69,6 +72,7 @@ wait $! # Remove old data not linked anymore. # See restic-prune(1) or http://restic.readthedocs.io/en/latest/060_forget.html restic prune \ + --option b2.connections=$B2_CONNECTIONS \ --verbose & wait $! diff --git a/usr/local/sbin/restic_check.sh b/usr/local/sbin/restic_check.sh index 776e7a7..46384ce 100644 --- a/usr/local/sbin/restic_check.sh +++ b/usr/local/sbin/restic_check.sh @@ -16,9 +16,11 @@ exit_hook() { trap exit_hook INT TERM - source /etc/restic/b2_env.sh +# How many network connections to set up to B2. Default is 5. +B2_CONNECTIONS=50 + # Remove locks from other stale processes to keep the automated backup running. # NOTE nope, dont' unlock liek restic_backup.sh. restic_backup.sh should take preceedance over this script. #restic unlock & @@ -26,5 +28,6 @@ source /etc/restic/b2_env.sh # Check repository for errors. restic check \ + --option b2.connections=$B2_CONNECTIONS \ --verbose & wait $!