MODX Core and Manager Upgrade: Recovering Safely When a Mid-Upgrade Failure Leaves Partial Schema Changes
0 reputation · 03 May 2023, 17:02 UTC
Context
We run MODX (assume a current Revolution 3.x line, please note if behavior differs) and are planning our upgrade runbook. The upgrade is driven by PHP setup scripts that touch both the file system and the database schema, and my understanding is that if one step fails, the process halts without automatically reverting the steps that already succeeded.
The interoperability concern
At the boundary between the Core upgrade scripts and the Manager, the Manager appears to log the last successful step and offers a manual rollback path, but there seems to be no transactional wrapping of schema changes and no automatic pre-upgrade database snapshot. That raises the risk of a half-migrated schema coexisting with newly written template or core files from the aborted run.
Unresolved questions
- Is the manual rollback option in the Manager guaranteed to reverse all schema mutations applied before the failure point, or can partial changes persist silently?
- Do leftover file-system artifacts from a failed upgrade need to be removed before re-running setup, and does the installer detect them?
- Is a full database and file backup before every upgrade the only community-endorsed safe recovery strategy, or is there a supported snapshot mechanism I have missed?