Interview practice question
Writing a reliable backup script
Cloud & DevOps · Linux and Scripting · Intermediate
You need a script that backs up a database nightly, keeps 14 days of backups and alerts on failure. How would you write it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- set -euo pipefail.
- Timestamped dump and compression.
- Upload off-server (S3).
- Delete backups older than 14 days.
- Log and alert on failure; test restores.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.