diff --git a/Repo-docs-MODULE-ARCHITECTURE.md b/Repo-docs-MODULE-ARCHITECTURE.md index 85a4b11..6eab1ff 100644 --- a/Repo-docs-MODULE-ARCHITECTURE.md +++ b/Repo-docs-MODULE-ARCHITECTURE.md @@ -1,4 +1,4 @@ - + > Mirrored from `/mnt/DATA/git/govoplan-core/docs/MODULE_ARCHITECTURE.md`. > Origin: `repository`. @@ -423,8 +423,13 @@ The package install-plan API records operator intent only: automatically rolls packages back from the run snapshot if commands, migrations, restart, or health recovery fail. - `govoplan-module-installer --rollback ` restores the saved package - snapshots, restores the captured SQLite database snapshot when present, and - reruns package installation from the previous freeze file. + snapshots, restores the captured SQLite or external database snapshot when + present, and reruns package installation from the previous freeze file. +- `--database-backup-command ''` and + `--database-restore-command ''` provide non-SQLite backup/restore + hooks for migrated installer runs. The backup hook runs before migrations; + the restore hook runs during rollback and can be overridden on the rollback + command line. - `govoplan-module-installer --list-runs --format json`, `--show-run --format json`, and `--lock-status --format json` expose the same run-history and lock information from the operator shell. @@ -453,10 +458,17 @@ planning surface; the trusted daemon/CLI is the executor. Automatic rollback covers Python and WebUI package state. For `sqlite:///` database URLs, `--migrate` also captures a SQLite backup and rollback restores -it before the supervisor restarts the server. Non-SQLite deployments still need -an external managed backup/restore path before running migrations, and module -uninstall remains blocked until data and migration-state retirement rules are -satisfied. +it before the supervisor restarts the server. For non-SQLite database URLs, +`--migrate` requires deployment-specific backup and restore commands. Hook +commands run in the installer run directory with: + +- `GOVOPLAN_INSTALLER_RUN_DIR` +- `GOVOPLAN_DATABASE_URL` +- `GOVOPLAN_DATABASE_BACKUP_PATH` +- `GOVOPLAN_DATABASE_BACKUP_METADATA` + +Module uninstall remains blocked until data and migration-state retirement rules +are satisfied. The running FastAPI server still reports `package_mutation_supported=false` because dependency-manager operations are not executed inside request handlers.