diff --git a/docker/scripts/install.sh b/docker/scripts/install.sh index fc14fc5cb..501a40221 100644 --- a/docker/scripts/install.sh +++ b/docker/scripts/install.sh @@ -178,6 +178,8 @@ if $MIGRATION_MODE; then wait_for_pg "${DB_USER}" step "Restoring database" + [[ -f "${DUMP_FILE}" ]] \ + || error "Dump file '${DUMP_FILE}' not found. The migration script may have failed.\n Check: ./surfsense-migration.log\n Or run manually: bash ${INSTALL_DIR}/scripts/migrate-database.sh --yes" info "Restoring dump into PostgreSQL 17 — this may take a while for large databases..." RESTORE_ERR="/tmp/surfsense_restore_err.log" diff --git a/docker/scripts/migrate-database.sh b/docker/scripts/migrate-database.sh index 8a7c9eae6..26b276dad 100755 --- a/docker/scripts/migrate-database.sh +++ b/docker/scripts/migrate-database.sh @@ -132,7 +132,7 @@ wait_for_pg() { success "${label} is ready." } -step "Migrating data from legacy database (PostgreSQL 14 → 17)" +info "Migrating data from legacy database (PostgreSQL 14 → 17)" # ── Step 0: Pre-flight checks ───────────────────────────────────────────────── step "0" "Pre-flight checks"