Run a seed-and-replicate cutover with validation in order

applied · 85 min · Objective 2.3

Task

Execute a full online migration between two local databases: seed, replicate, converge, freeze, cut over, and validate function, performance and data integrity in that order. Then prove the integrity check can actually fail.

Steps

  1. Start source and target databases. Load the source with enough data that a bulk copy takes a measurable time, and start a writer making continuous changes.
  2. Seed the target with a bulk copy, then start replicating ongoing changes. Record replication lag every 15 seconds into lab/lag.csv and confirm it is stable or falling before proceeding.
  3. Execute the cutover: stop the writer, let replication drain, confirm lag reaches zero, and point the client at the target. Record each step's timestamp in lab/cutover-log.txt.
  4. Validate in order and record each result: function (the client can read and write), performance (compared against a pre-migration measurement), then data integrity (row counts and a checksum over a key table).
  5. Now prove the integrity check works: delete one row from the target, re-run the check, and confirm it FAILS. Restore, confirm it passes, then remove both containers.

Verify

awk -F, 'END{print NR" lag measurement(s)"}' lab/lag.csv
grep -Eci 'function' lab/cutover-log.txt
grep -Eci 'performance' lab/cutover-log.txt
grep -Eci 'checksum|row count|integrity' lab/cutover-log.txt
grep -Eci 'fail' lab/cutover-log.txt

The failure record is the most important line in the file. An integrity check that has only ever passed has not been shown to detect anything.

This is an independent study companion for CompTIA Cloud+ CV0-004 and is not produced by or endorsed by CompTIA.