Step 1/1: Sync a directory

rsync -a SOURCE/ TARGET/ syncs directories, sending only what changed, so the second run is fast. -a recurses and keeps permissions and times, -v lists what was sent, --delete removes extra files from the target, -n only shows what would happen. The / after the source matters: with it, the contents are copied; without it, the directory itself.

$ rsync -a site/ backup01:/srv/backup/site/
Fundamentalsrsyncsshnetwork
Sync a whole directory
Use rsync to sync the directory photos, with everything in it, to /srv/backup/photos on backup01 (a key is set up).

This exercise needs real Linux

The commands it uses (processes, networking and more) are not in the simulator. Switch to real Linux and the exercise runs in a real Linux system inside your browser.

scpNext lesson:iptables