Hands-on Lab·LPIC-2
A backup you have actually restored
Topic 206 asks for backup operations and for notifying users. This guide takes two snapshots of a directory with rsync --link-dest, proves with inode numbers and du that the second one costs almost nothing, restores it and checks the restore with diff -r - then schedules a real shutdown, reads the file systemd wrote, and cancels it.
201: System Maintenance Guide 28 of 29 Intermediate
- OSUbuntu 26.04 LTS
- Kernel7.0.0-30-generic
- systemd259
- Block devicesone 50 GB disk
- TimeAbout 24 min
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LPIC2-A01 | 192.168.0.78 | Ubuntu 26.04 LTS | Primary service host - BIND, Apache, Samba, Postfix. Topic 204 RAID runs on loop devices; this machine has no spare disk | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when you need a backup scheme that keeps several days without storing several copies, or when a maintenance window has to be announced. This matters because a backup that has never been restored is an assumption, and because shutdown does more than one thing depending on the flag.
- taking a full snapshot with
rsync -aAXand knowing what the flags preserve - making the second snapshot share unchanged files with the first via
--link-dest - proving the sharing with inode numbers and link counts rather than trusting it
- restoring a snapshot and verifying it with
diff -r - recovering an older version from an earlier snapshot
- scheduling, reading and cancelling a shutdown, and knowing what
-kdoes instead
Before you start
- building-from-source-on-a-server
-
Something worth backing up
-
The first snapshot
-
A change, and a second snapshot that costs almost nothing
-
A backup nobody has restored is not a backup
-
Telling people before you take it away
-
Putting the machine back