diff --git a/ops/borg-ui/scripts/pre-backup-dumps.sh b/ops/borg-ui/scripts/pre-backup-dumps.sh index 806eaa2..b8002fd 100644 --- a/ops/borg-ui/scripts/pre-backup-dumps.sh +++ b/ops/borg-ui/scripts/pre-backup-dumps.sh @@ -81,7 +81,11 @@ dump_sqlite_file() { tmp="$TMP_DIR/$(basename "$output").tmp" log "Dumping SQLite database '$label' from $source" rm -f "$tmp" - sqlite3 "$source" ".backup $tmp" + if ! sqlite3 "$source" ".backup $tmp"; then + warn "SQLite backup failed for $label" + rm -f "$tmp" + return 1 + fi if [ "$(sqlite3 "$tmp" 'PRAGMA quick_check;')" != "ok" ]; then warn "SQLite quick_check failed for $label" rm -f "$tmp"