Linux Labs

Storage / Stage 10 of 11 · step 7 of 8

Bring a directory mirror up to date (rsync)

medium ~25 min
Not running Starting usually ~20 s
Report a problem

Situation

~/sync-lab/mirror is a mirror of the ~/sync-lab/source directory that nobody has refreshed in a while. Tomorrow the data moves from the mirror to a standby server, so the mirror has to match the source byte for byte. Next to them, ~/sync-lab/keep holds data that has nothing to do with the mirror.

Task

Make mirror an exact copy of the contents of source:

  1. mirror has the same files and directories as source, hidden ones included, and nothing extra;
  2. every file's contents, mode, owner and modification time match source;
  3. a dry-run sync from source into mirror that compares contents finds no differences;
  4. source and keep are left as they were.

Constraints

  • You may delete things only inside mirror.
  • Work as your own user; this task needs no sudo.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 4
  • mirror has the same files and directories as source, hidden ones included, and nothing extra — not checked yet
  • File contents, modes, owners and modification times match source — not checked yet
  • A dry-run sync from source into mirror that compares contents finds no differences — not checked yet
  • source and keep are left as they were — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…