Add resilient emergency restore for partial BizTalk operations

This commit is contained in:
2026-08-19 17:45:20 +02:00
parent 08626197be
commit 9ce7e8d45a
19 changed files with 1221 additions and 120 deletions
+11
View File
@@ -17,11 +17,15 @@ WinForms tool for controlled Microsoft BizTalk Server 2020 platform operations d
- Diff between `before.json` and `after.json`
- Controlled shutdown from the current runtime state
- Controlled restore from `before.json`
- State-aware emergency restore from a preserved `before.json`, including Enterprise SSO startup
- Host instance handling for the selected BizTalk server
- Dry-run mode enabled by default
- WMI access through `root\MicrosoftBizTalkServer`
- Startup check for administrator rights
- Detailed operation logging in the GUI and daily rolling log files under ProgramData
- Best-effort plan execution: one isolated WMI failure is recorded while remaining independent steps continue
- Idempotent execution that skips artifacts already in the requested target state
- Durable per-step result reports even when a shutdown or restore completes only partially
- Environment status indicator based on host instance state
- Clear and Close actions in the main toolbar
- No compile-time dependency on BizTalk ExplorerOM assemblies
@@ -41,6 +45,8 @@ WinForms tool for controlled Microsoft BizTalk Server 2020 platform operations d
7. After maintenance, click **Restore** using the saved `before.json`.
8. Click **Snapshot After** and **Compare**.
If a shutdown was interrupted and only the original `before.json` remains, select that file, keep **Dry run** enabled and click **Emergency Restore**. The recovery plan never overwrites the source snapshot, ensures the `ENTSSO` service is running first, skips already-correct runtime states and continues after isolated step failures. Disable Dry run only after reviewing the timestamped emergency plan.
The environment indicator shows `Started`, `Stopped`, `Partial` or `Unknown` from the most recent snapshot. `Clear` removes the visible status and operation log grids; it does not delete files.
The application requests administrator rights through its UAC manifest and checks them again during startup. Only one GUI instance can run per Windows session.
@@ -68,6 +74,8 @@ Orchestrations that were `Bound` are deliberately left unchanged during restore
- `before.json`, `after.json`
- `shutdown-plan.json`, `restore-plan.json`
- `shutdown-after.json`, `restore-after.json`
- `shutdown-result.json`, `restore-result.json`
- Timestamped `emergency-source-before-*`, `emergency-restore-plan-*`, `emergency-restore-result-*` and `emergency-restore-after-*` files
- `diff.json`, `diff.csv`, `diff.html`
- Snapshot sidecars: `*.csv`, `*.hosts.csv`, `*.html`
- Runtime logs under `%ProgramData%\BizTalkPlatformManagementTool\Logs`
@@ -78,6 +86,8 @@ Log files are retained for the current day plus the previous four days. Older `B
The Operation Log shows the WMI class, key property, key value and method for real shutdown and restore steps. WMI objects are resolved with a broad `SELECT * FROM <class>` query and a client-side key filter so names containing special characters do not break the WMI query parser.
Execution is deliberately best-effort. A failure such as an adapter-specific validation exception is written as `Failed` in the result report, but later independent plan steps are still attempted. The GUI ends in a failed/operator-review state when any step failed; it never reports a partial execution as an unconditional success. The post-operation snapshot is attempted independently and its own failure is preserved in the same report.
Snapshot and plan JSON files are written as UTF-8 without BOM. Loading is tolerant of existing files that contain a UTF-8 BOM or a visible BOM marker from previous encoding conversions.
JSON snapshots and plans are written through a same-directory temporary file and atomic replacement. Snapshot comparison keys artifacts by application plus name, preventing collisions between equal artifact names in different applications. CSV fields that could be interpreted as spreadsheet formulas are neutralized.
@@ -104,5 +114,6 @@ Targeted German inline comments explain non-obvious operational decisions such a
- [Dokumentation](Dokumentation.md)
- [Installer stability analysis](docs/Installer-Stabilitaetsanalyse-2026-08-11.md)
- [ACC activation incident analysis](docs/ACC-Installer-Aktivierungsfehler-2026-08-11.md)
- [ACC runtime shutdown incident and recovery fix](docs/ACC-Runtime-Shutdown-Exception-2026-08-19.md)
- [AI maintainer handoff](AI-README.md)
- [References](REFERENCES.md)