terminal.cab

Linux Basics Lesson 38 of 38

guestLevel 1Badges and progress0/100 XP, XP to the next levelStreak0

The backup did not run

Boss 150 XP

10 minutes

Learning goals

Three questions, one after the other: is the job there, did cron start it, and what did it say? Then you fix it, and check that the fix is in place.

The script lies in ~/bin/backup.sh. You can read it with head. It does not run on this page: ./bin/backup.sh gives a hint, because running scripts comes with another package, and backup.sh alone answers command not found, because ~/bin is not in your PATH here. cat, ls and sudo are not loaded either: cat and ls answer with command not found, sudo with a hint. head, tail, journalctl and crontab are all you need.

The crontab has no editor here. Write the new one with echo into a pipe to crontab -, or into a file that you install with crontab FILE.

Steps

Step 1/5: First question. Is the job in the crontab at all? Show it.

Boss 150 XP

08:45, and the backup of last night is missing from ~/backup. The newest file there is from the 15th. Mia set up the nightly job yesterday, and she says that backup.sh runs cleanly when she starts it by hand. So what happened at 03:00?

  1. Step 1

    First question. Is the job in the crontab at all? Show it.

  2. Step 2

  3. Step 3

  4. Step 4

  5. Step 5

Loading terminal …

lerner@web-01: ~bash
lerner@web-01:~$

Esc, then Tab leaves the terminal

Step 1 of 5

Cards

  1. Card 1 of 2

    Tap the card or press Space to turn it over.

  2. Card 2 of 2

    Tap the card or press Space to turn it over.

Cheat sheet

The most important command lines of this module on one A4 page, black and white, to print or keep on your phone.