M README.md +2 -1
@@ 242,9 242,10 @@ Okt 16 22:15:19 saturn systemd[1]: resti
## Änderungsprotokoll
-## offen - Version 5
+## 19. Juli 2024 - Version 5
* Umleitung der Ausgabe in eine Logdatei ist möglich
+* Funktionsvariablen als "local" deklarieren
### 30. März 2024 - Version 4
M restic.sh +5 -0
@@ 170,6 170,8 @@ function do_show_snapshots {
}
function do_show_repo_stats {
+ local BUCKET_SIZE_GB
+ local BUCKET_SIZE_UNIT
info "Show repository statistics ..."
BUCKET_SIZE_GB=$($RESTIC_BIN stats --mode raw-data | awk '/Total Size:/ { print $3 }')
BUCKET_SIZE_UNIT=$($RESTIC_BIN stats --mode raw-data | awk '/Total Size:/ { print $4 }')
@@ 179,6 181,9 @@ function do_show_repo_stats {
}
function do_show_size_all_buckets {
+ local ALL_BUCKET_NAMES
+ local BUCKET_SIZE
+ local BYTES_TOTAL
info "Show size of all buckets ..."
# use a subshell to prevent durable overwriting S3 access credentials