Linux Labs

Storage / Stage 9 of 11

The archive exists — now check the restore

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 7 · on a machine · 5 min

Checking the nightly copy

What you will learn

  • Build a tar archive that holds the whole directory, hidden files included.
  • Read an archive listing and predict where each file lands on extraction.
  • Restore into a separate directory and compare the copy with the archive.

Every night a script saves the application from ~/backup-lab/live/app into the archive /srv/backup-lab/app.tar. Last night it finished without errors.

Before updating the application, check the copy: unpack the archive into the empty restore directory and compare it with the working copy.

Exercise · look

Unpack the nightly archive

In ~/backup-lab, unpack the nightly archive into restore, then list both directories: the working copy live/app and the restored restore/app.

Sign in and start The machine is available after signing in
Check yourself 1 question

Where did .release get lost?

  • ls -l live/app/.release shows 1 September: the file is older than last night's archive.

  • The same ls -a showed .release in live/app: the -a option lists hidden names too.

  • tar created the directories and the private secret.env for you without complaint, and a hidden name differs only by the leading dot. The archive listing later shows that .release is not in the archive at all.

.release is not in the archive itself: it was lost when the archive was built.

Ubuntu 24.04
Loading…