>_ IzzyLab

Hands-on task

This task is step 19 of the course “New server: setup from scratch”

Archive /etc before handing over the server

easy~2 min

The server is set up, all that's left is to hand it over to the client. So that any future breakage can be rolled back to today's state, pack the whole /etc directory into a tar.gz archive /var/backups/etc-handover.tar.gz.

What you'll practise:
  • tar
  • gzip
  • configuration backup
  • /var/backups

Topic breakdown

Before a handover or big changes, admins take a copy of /etc — almost all of the system configuration lives there. tar glues a file tree into one stream, and compression is a separate option that pipes it through gzip, hence the double extension .tar.gz. The mode (create, list, extract) and options are given as letters; the archive name goes right after f. tar stores absolute paths as relative ones so that extracting doesn't accidentally overwrite a live system. /var/backups is the standard place for such copies on Debian and Ubuntu.

What's checked

  1. archive /var/backups/etc-handover.tar.gz created
  2. the archive contains all of /etc

What it looks like