What you will build
Step 1: Make the full backup
Create a directory named notes with two files, a.txt and b.txt. Make a full archive named full.tar with a new snapshot file named snap.snar. The snapshot file is what makes the next run incremental.
mkdir -p notes
echo first > notes/a.txt
echo second > notes/b.txt
tar --listed-incremental=snap.snar -cf full.tar notesStep 2: Make an incremental backup
Wait one second, then change a.txt and create c.txt. Run tar with the same snapshot file to make incr.tar. The archive should hold a.txt and c.txt, but not b.txt, which did not change.
sleep 1
echo more >> notes/a.txt
echo third > notes/c.txt
tar --listed-incremental=snap.snar -cf incr.tar notes
tar -tf incr.tarStep 3: Restore the chain in order
Extract full.tar and then incr.tar into an empty directory named restore. Compare the restored notes with the current notes using diff -r.
mkdir -p restore
tar -xf full.tar -C restore
tar -xf incr.tar -C restore
diff -r notes restore/notes && echo restoredFiles
walkthrough.sh: every step of the reference solution, in order.
How it is checked
Each step in the guided lab has a check script that runs on the lab machine after you finish. It passes only when the files and output it expects are there, so the lab cannot be completed by reading alone.