LPIC-2 201-450 study materials
LPIC-2 201-450 study resources

LPIC-2 201-450: System Maintenance

LPIC-2 201-450 · Work through your exam, one topic at a time.

All guide sections

System Maintenance

System Maintenance covers building and installing software from source, designing backups that restore correctly, rotating logs, and notifying users about maintenance.

Source, backup and logs

  • A typical source build is ./configure --prefix=/usr/local, make, make install. Use --help to see options and DESTDIR to stage files for packaging instead of writing directly to the live root.
  • tar -czf, rsync -aAX, dd, and cpio serve different backup needs. rsync preserves ownership, ACLs and xattrs with -aAX; trailing slashes change whether the source directory itself is copied.
  • Test restores, not only backups. A backup on the same disk is not protection against disk failure.
  • logrotate reads /etc/logrotate.conf and /etc/logrotate.d/; test with logrotate -d before relying on a new rule.
  • Notify users with wall, /etc/motd, or a scheduled shutdown +10 'message'.

Worked example

Back up /srv nightly to /backup/srv while preserving metadata. Run rsync -aAX --delete /srv/ /backup/srv/ after a --dry-run. Reasoning: -a recurses and preserves times, symlinks and permissions; -A preserves ACLs; -X preserves xattrs. The trailing slash on /srv/ copies its contents into /backup/srv/; without it, the result would be /backup/srv/srv/. --delete removes files at the destination that no longer exist at the source, so dry-run first.

Traps

  • Running make install without a prefix and overwriting distribution files.
  • Misreading rsync's trailing-slash behavior.
  • Rotating logs with wrong ownership or permissions.
  • Never testing a restore.