File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,12 @@ MAX_LOG_SIZE_MB="10"
7272# Days to keep rotated logs
7373LOG_RETENTION_DAYS="30"
7474
75+ # --- UI / UX ---
76+ # Set the update rate (frames per second) for the progress bar shown during
77+ # interactive runs with the --verbose flag. Default is 4 if unset.
78+ # Set to a value like "10" for more updates or "1" for fewer.
79+ PROGRESS_FPS_RATE="4"
80+
7581# --- Notifications ---
7682# Enable notifications
7783NTFY_ENABLED=true
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# =================================================================
4- # Restic Backup Script v0.35 - 2025.09.28
4+ # Restic Backup Script v0.36 - 2025.09.29
55# =================================================================
66
77set -euo pipefail
88umask 077
99
1010# --- Script Constants ---
11- SCRIPT_VERSION=" 0.35 "
11+ SCRIPT_VERSION=" 0.36 "
1212SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd)
1313CONFIG_FILE=" ${SCRIPT_DIR} /restic-backup.conf"
1414LOCK_FILE=" /tmp/restic-backup.lock"
@@ -586,9 +586,17 @@ send_notification() {
586586setup_environment () {
587587 export RESTIC_REPOSITORY
588588 export RESTIC_PASSWORD_FILE
589+
589590 if [ -n " ${GOMAXPROCS_LIMIT:- } " ]; then
590591 export GOMAXPROCS=" ${GOMAXPROCS_LIMIT} "
591592 fi
593+
594+ # Enable progress bar for interactive --verbose runs
595+ if [[ " ${VERBOSE_MODE:- false} " == " true" ]] && [ -t 1 ]; then
596+ local fps_rate=" ${PROGRESS_FPS_RATE:- 4} "
597+ export RESTIC_PROGRESS_FPS=" ${fps_rate} "
598+ fi
599+
592600 if [ -n " ${RESTIC_CACHE_DIR:- } " ]; then
593601 export RESTIC_CACHE_DIR
594602 mkdir -p " $RESTIC_CACHE_DIR "
@@ -1504,4 +1512,4 @@ case "${1:-}" in
15041512 ;;
15051513esac
15061514
1507- echo -e " ${C_BOLD} --- Backup Script Completed ---${C_RESET} "
1515+ echo -e " ${C_BOLD} --- Backup Script Completed ---${C_RESET} "
Original file line number Diff line number Diff line change 1- c81e8a05b96574f64acccf3860163e5b15e27d1c264c8ef0d6f98caf80f81af7 restic-backup.sh
1+ 0b68152c13941ac17111f3f6cabd3bc3ebb8a6ed51885578db0b5dee4eab7326 restic-backup.sh
You can’t perform that action at this time.
0 commit comments