Skip to content
Clairos Learn

Files and paths · Lesson 33 of 36 · 8 minutes

Restore copy verification

Copy a restore candidate and compare it with its source.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated Linux lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

Verifying a copied restore candidate helps operators explain what they know before they change anything.

cp
Copy a file to a new location, leaving the original in place.

Confirm the destination before replacing a file. This lab supports file copies, not every cp option.

diff
Compare two text files; a difference is a meaningful nonzero status, not necessarily an execution error.

Status 1 means differences for diff; shell status must be interpreted in command context.

sha256sum
Compare content digests to detect byte changes, not to establish who authored the file.

A checksum detects changes only relative to a trusted expected digest.

Worked example and expected result
$ cp restore/index.html lab/restore-candidate.html
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

$ diff restore/index.html lab/restore-candidate.html
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

$ sha256sum lab/restore-candidate.html
461e71705c1a1643f91a286005d2017f902347ac41c738e60461bf7a700cf741  /home/learner/lab/restore-candidate.html

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Repeat this workflow in the sandbox with a different scratch filename. Keep the system fixtures unchanged and compare the observed output with your expectation before moving on.

Explain it

In “Restore copy verification”, which interpretation is safe?

Apply it elsewhere

Before adapting the diff workflow from “Restore copy verification” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Symlink chain auditTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Sorted inventory comparisonCompare two sorted account inventories without modifying either file.Practice
  2. 02Symlink chain auditCreate a link, inspect its stored target, and resolve the final path.Practice
  3. 03Archive manifest workflowCreate an archive, list its members, and hash the artifact.Practice