Rehearse a migration
1
Create an initialized baseline
Set a temporary password in the host shell:Start the baseline database:Wait for initialization, then stop the database cleanly:Stop it cleanly before taking the snapshot:
2
Snapshot the baseline
3
Apply the migration
Boot a fresh database from the snapshot:Wait for the restored database to become ready:Apply a sample destructive change and verify it:Replace those statements with your real migration command and validation suite.
4
Roll back by replacing the sandbox
Stop the mutated database and boot another clean copy of the baseline under the same name:Replace it with a fresh sandbox from the snapshot:Wait for the clean database to become ready:Confirm the sample table is absent:The result should be
rolled-back.5
Clean up
Remove the database sandboxes:Remove the snapshot:Clear the password from the host shell: