Question
XML backup restoration: schema validation timing during versus after restore
Rin Moss
0 reputation · 12 Jan 2024, 22:42 UTC
17.5K views0
Validation timing trade-offs
Restoring XML from backup requires deciding when to validate against the governing XSD or DTD. Performing validation during the restore pipeline catches structural defects early but adds latency and may require the schema to be available on the restore host. Deferring validation until the application loads the data shifts the cost to runtime and risks discovering corruption only when business logic executes.
Constraints
- Schema files may not be co-located with backup archives in disaster-recovery scenarios.
- Large documents (hundreds of megabytes) make streaming validation memory-intensive.
- Application startup SLAs may not tolerate a full validation pass.
Open questions
- Should the restore process enforce schema validation as a gate before marking the restore complete?
- If validation is deferred, what minimal integrity checks (hash, canonical diff) must still run during restore?
- How should the system surface validation failures that occur after the application has started consuming the restored data?