mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
fix: add error handling for missing dump file in migration script and update logging for migration step
This commit is contained in:
parent
3e29ae37fa
commit
ccae5ffeb1
2 changed files with 3 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue