Linux Labs

Storage / Stage 10 of 11

Rsync — mirrors, comparison and deletion boundaries

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 8 · lab · 25 minmedium

Bring a directory mirror up to date (rsync)

A directory mirror has fallen behind its source. Make it an exact copy and leave both the source and the neighbouring data intact.

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.

Lab · on your own

No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.

Goals

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

The machine is starting

Hints

0 of 3

Lab goals

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

Lab goals

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