Plan and run a cutover that keeps a way back
Task
Migrate a small file service from lin-srv to lin-dst with a planned cutover: an inventory, a pre-seed, a freeze on the source, a delta sync, a DNS change that moves clients, verification, and a documented way back. Then use the way back once, on purpose, to prove it works before you would ever need it.
Steps
- Write
lab/cutover/inventory.csvwith headeritem,source,notescovering the data, the share, its permissions, the DNS name, and any client that mounts it. - Write
lab/cutover/plan.txtwith the steps, each with a time, and a section beginningrollback:that describes how to return clients to lin-srv. - Lower the TTL of
files.lab.internal, pre-seed/srv/filesto lin-dst with rsync, then make the source share read-only and run the delta sync. - Point
files.lab.internalat lin-dst, set up the same share there, and from a client savedig files.lab.internaland a directory listing of the mounted share tolab/cutover/after.txt. - Carry out the rollback: point the name back at lin-srv and make its share writable. Save
digand a listing tolab/cutover/rollback.txt, then cut over again. - Record the results in
lab/cutover/log.csvwith headerstep,time,result, where result isokorfail.
Verify
These checks run in a POSIX shell: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. A stock Windows PowerShell or Command Prompt has no awk or grep, so there the first line fails.
awk -F, 'NR>1 {n++} END {print n" inventory item(s)"}' lab/cutover/inventory.csv
grep -c '^rollback:' lab/cutover/plan.txt
grep -c '192.168.56' lab/cutover/after.txt lab/cutover/rollback.txt
awk '/IN[[:space:]]+A[[:space:]]/ {print $NF}' lab/cutover/after.txt lab/cutover/rollback.txt | sort -u | wc -l
awk -F, 'NR>1 && $3 ~ /fail/ {f++} END {print f+0" failed step(s)"}' lab/cutover/log.csv
The inventory has at least five items, the plan has a rollback section, and the name resolved to two different addresses -- the new server after cutover and the old one after rollback -- so the fourth command prints 2. A rollback that has been tested is a rollback you can promise; one that has not is a hope.
Notes
The source stays intact and read-only until the new server has proved itself, which is why the rollback was possible at all. Deleting or wiping the source as part of the migration removes the only way back.
This is an independent study companion for CompTIA Server+ SK0-005 and is not produced by or endorsed by CompTIA.