Take the three backup types and time their restores

short · 50 min · Objective 3.2

Task

Build full, incremental and differential backups of the same dataset across a week of simulated changes, then restore from each and time it. The storage and restore-time trade is obvious once you have the numbers and abstract until then.

Steps

  1. Create a dataset of a few hundred megabytes in lab/data/. Take a full backup and record its size and duration in lab/backups.csv.
  2. Simulate six days: each day modify roughly 5% of the files, then take BOTH an incremental (changes since the last backup of any kind) and a differential (changes since the last full).
  3. Record every backup's size and duration. Plot or tabulate how the incremental stays small while the differential grows.
  4. Restore day 6 two ways -- full plus all six incrementals, and full plus the last differential -- and, for contrast, the full alone, which gives you day 0. Time each and compare the restored tree's checksum with day 6's. Record the times and checksums in lab/backups.md.
  5. Delete the day 3 incremental and run the incremental restore again, then compare its checksum with day 6's. Many tools restore the remaining links without complaint and simply leave out day 3's changes, which is worse than an error. Record in lab/backups.md whether yours failed loudly or restored the wrong tree silently, with the sentence about chain fragility.

Verify

awk -F, 'NR>1 && NF>=3 {n++} END {print n" backup record(s)"}' lab/backups.csv
grep -Eci 'checksum|\bsha[0-9-]*' lab/backups.csv lab/backups.md
grep -Eci 'chain|broken|missing' lab/backups.md
grep -Ec '[0-9]+ ?(s|sec|second)' lab/backups.md

At least thirteen backup records, a restore time for each of the three methods, and the broken-chain result. If the broken-chain restore "worked", the checksum is what says otherwise: day 3's changes are missing and nothing reported it. A backup chain is verified by comparing what comes back, never by the restore's exit status.

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