Plan and run a cutover that keeps a way back

applied · 60 min · Objective 2.3

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

  1. Write lab/cutover/inventory.csv with header item,source,notes covering the data, the share, its permissions, the DNS name, and any client that mounts it.
  2. Write lab/cutover/plan.txt with the steps, each with a time, and a section beginning rollback: that describes how to return clients to lin-srv.
  3. Lower the TTL of files.lab.internal, pre-seed /srv/files to lin-dst with rsync, then make the source share read-only and run the delta sync.
  4. Point files.lab.internal at lin-dst, set up the same share there, and from a client save dig files.lab.internal and a directory listing of the mounted share to lab/cutover/after.txt.
  5. Carry out the rollback: point the name back at lin-srv and make its share writable. Save dig and a listing to lab/cutover/rollback.txt, then cut over again.
  6. Record the results in lab/cutover/log.csv with header step,time,result, where result is ok or fail.

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.