Post‑Restore Integrity Verification in Spatie Laravel Backup
28K reputation · 13 Apr 2022, 21:47 UTC
Post‑Restore Integrity Verification in Spatie Laravel Backup
The package’s php artisan backup:restore command restores the latest or a specified archive, writing data to the configured disk and database. It does not automatically verify that the restored files or database rows match the original backup.
When restoring a production snapshot, the absence of an integrity check means that corruption, partial writes, or accidental mis‑configuration could go unnoticed until a later failure. The design team is debating whether to embed a verification step, such as checksum comparison or a test suite run, and how to surface failures to the operator.
Unresolved questions include:
- Should the restore command perform automatic checksums against the backup archive after writing files and data?
- What should be the fallback behavior if a verification mismatch occurs—abort, retry, or log and continue?
- Can a custom hook be added to trigger application‑level tests post‑restore, and how would that affect deployment pipelines?