Backup, isolated restoration and rollback
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Before any separately authorized Docker query, verify the effective endpoint and builder (including environment overrides), not just the context name. Use only disposable lab resources; a failed check is a stop condition, not permission to retry against a different host.
Local drill: source notes.db -> snapshot.db -> restored.dbUse SQLite Connection.backup, then PRAGMA integrity_check.Check expected rows in restored database; compare snapshot and restore.Example objectives: RPO <= 5 min; RTO <= 10 min (targets only).Container drill: export a verified backup outside the data volume;restore to a fresh isolated database/volume, never over live data.RPO is the maximum acceptable data loss measured in time; RTO is the target time to restore service. Neither is established by creating a file. SQLite backup creates a consistent database snapshot, unlike blindly copying a live database file while journals may exist. The local reference backup function refuses existing destinations and checks integrity. A backup retained on the same volume alone does not survive volume loss; copy it to a separate approved storage location and verify checksums. For recovery, test a fresh restored database and compare business records. Image rollback does not roll back database schema or data automatically. Confirm schema compatibility, preserve the current data and obtain approval before any actual rollback. SQLite integrity_check verifies database structure, not the business contents or a recovery objective. The local helper creates an exclusive new file; it is not an end-to-end container-volume restore. Record a checksum of the source snapshot and of its copied file, compare them before restoration, and verify expected rows separately. Record the recovery point and elapsed validation time; targets are not measured results.
Common mistake
Do not overwrite the live database with an untested archive or assume a previous image understands the current schema.
Manual practice
Run the local restore test, add an expected-row assertion, then write a recovery record including snapshot time, measured duration, integrity result and remaining risks.
Worksheet: lab-fixtures/docker-professional-capstone/07-restore/scenario.txt. Project: lab-fixtures/docker-professional-capstone/project/.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Backup, isolated restoration and rollback — Knowledge check
Interpret capstone evidence and make a safe operational decision.
What is the safest drill destination?
Does a backup on the same lost volume survive?
Does image rollback restore database schema?