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 →
- 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
- Run from a systemd timer, log to the journal, alert on failure.
- 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."
More on Storage, disks and filesystems
You get paged at 3 AM: the root filesystem on a production server is at 98% and climbing. Walk through your response.BeginnerA new 200 GB EBS volume is attached to an EC2 instance. How do you make it usable and persistent across reboots?BeginnerThe `/var` LVM logical volume is nearly full and there is free space in the volume group. How do you grow it online?BeginnerThe volume group has no free space. You've been given a new disk. How do you add it to grow `/var`?IntermediateA cloud VM's root disk was enlarged from 30 GB to 80 GB in the console, but `df` still shows 30 GB. What do you do?BeginnerYou need to move a busy MySQL data directory from the root disk to a new, faster volume. Plan it.Intermediate