Bird
0
0

You want to automate etcd backups daily and keep only the last 7 backups. Which approach is best?

hard📝 Workflow Q8 of 15
Kubernetes - Production Best Practices
You want to automate etcd backups daily and keep only the last 7 backups. Which approach is best?
AUse a cron job running 'etcdctl snapshot save' and a script to delete backups older than 7 days
BManually run backups and delete old files weekly
CConfigure etcd to auto-backup internally with retention
DUse kubectl to create backups and rely on pod logs for retention
Step-by-Step Solution
Solution:
  1. Step 1: Identify automation method

    Using a cron job to run 'etcdctl snapshot save' automates backups daily.
  2. Step 2: Manage retention

    A script to delete backups older than 7 days ensures only recent backups are kept.
  3. Final Answer:

    Use a cron job running 'etcdctl snapshot save' and a script to delete backups older than 7 days -> Option A
  4. Quick Check:

    Automate backup + retention = cron job + cleanup script [OK]
Quick Trick: Automate with cron and cleanup script for retention [OK]
Common Mistakes:
  • Relying on manual backups only
  • Expecting etcd to auto-backup with retention
  • Using kubectl which doesn't manage etcd snapshots

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes