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"
72
72
# Days to keep rotated logs
73
73
LOG_RETENTION_DAYS="30"
74
74
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
+
75
81
# --- Notifications ---
76
82
# Enable notifications
77
83
NTFY_ENABLED=true
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
# =================================================================
4
- # Restic Backup Script v0.35 - 2025.09.28
4
+ # Restic Backup Script v0.36 - 2025.09.29
5
5
# =================================================================
6
6
7
7
set -euo pipefail
8
8
umask 077
9
9
10
10
# --- Script Constants ---
11
- SCRIPT_VERSION=" 0.35 "
11
+ SCRIPT_VERSION=" 0.36 "
12
12
SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd)
13
13
CONFIG_FILE=" ${SCRIPT_DIR} /restic-backup.conf"
14
14
LOCK_FILE=" /tmp/restic-backup.lock"
@@ -586,9 +586,17 @@ send_notification() {
586
586
setup_environment () {
587
587
export RESTIC_REPOSITORY
588
588
export RESTIC_PASSWORD_FILE
589
+
589
590
if [ -n " ${GOMAXPROCS_LIMIT:- } " ]; then
590
591
export GOMAXPROCS=" ${GOMAXPROCS_LIMIT} "
591
592
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
+
592
600
if [ -n " ${RESTIC_CACHE_DIR:- } " ]; then
593
601
export RESTIC_CACHE_DIR
594
602
mkdir -p " $RESTIC_CACHE_DIR "
@@ -1504,4 +1512,4 @@ case "${1:-}" in
1504
1512
;;
1505
1513
esac
1506
1514
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