Swap deprecated --last option with --latest 1

This commit is contained in:
2026-09-22 15:35:39 -04:00
parent 9c26a0c48e
commit c6e2736cd1
+1 -1
View File
@@ -294,7 +294,7 @@ send_healthcheck "START" "Starting backup of $BACKUP_NAME"
# Pre-backup: Check repository connectivity # Pre-backup: Check repository connectivity
log_message "Checking repository connectivity..." log_message "Checking repository connectivity..."
CONNECTIVITY_OUTPUT="" CONNECTIVITY_OUTPUT=""
if ! CONNECTIVITY_OUTPUT=$(eval "$RESTIC_CMD snapshots --last" 2>&1); then if ! CONNECTIVITY_OUTPUT=$(eval "$RESTIC_CMD snapshots --latest 1" 2>&1); then
log_message "WARNING: Could not connect to repository or no snapshots exist yet" log_message "WARNING: Could not connect to repository or no snapshots exist yet"
if [ "$VERBOSE" = true ]; then if [ "$VERBOSE" = true ]; then
log_message "Connectivity check output: $CONNECTIVITY_OUTPUT" log_message "Connectivity check output: $CONNECTIVITY_OUTPUT"