Interview Prep/Linux/Storage, disks and filesystems

Your company wants nightly backups of `/etc`, `/home` and `/var/www` to a remote server, retained for 30 days. Design it.

IntermediateScenarioStorage, disks and filesystems
Answer

Situation read → Deduplicated, encrypted, versioned backups.

What I'd do →

  1. Use restic or borg rather than plain tar:
export RESTIC_REPOSITORY=sftp:backup@backup01:/srv/restic/web01
export RESTIC_PASSWORD_FILE=/root/.restic-pass
restic backup /etc /home /var/www --exclude-caches
restic forget --keep-daily 30 --prune
  1. Run from a systemd timer, log to the journal, alert on failure.
  2. Do a monthly restore test to a scratch directory.

Why → Dedup keeps storage small, encryption protects the remote copy, and forget handles retention.

Interview tip → "Backups you haven't restored are hopes, not backups."

All Linux questions Roadmap: Linux

More on Storage, disks and filesystems