Challenge - 5 Problems
Etcd Backup & Recovery Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Identify the output of an etcd snapshot save command
What is the expected output when you run the following command to save an etcd snapshot?
etcdctl snapshot save /tmp/etcd-backup.dbKubernetes
etcdctl snapshot save /tmp/etcd-backup.db
Attempts:
2 left
💡 Hint
The command saves the snapshot file to the specified path if permissions and environment are correct.
✗ Incorrect
The 'etcdctl snapshot save' command saves the current etcd data to the specified file path. If successful, it outputs a confirmation message with the file path.
🧠 Conceptual
intermediate1:30remaining
Understanding etcd snapshot restore behavior
When restoring an etcd cluster from a snapshot, which of the following is true about the restored data directory?
Attempts:
2 left
💡 Hint
Think about how restoring a snapshot replaces the cluster state.
✗ Incorrect
The etcd snapshot restore command requires the target data directory to be empty or not exist because it creates a fresh data directory from the snapshot. It does not merge or append data.
❓ Troubleshoot
advanced2:00remaining
Troubleshoot etcd snapshot restore failure due to permission error
You run the command:
and get the error:
What is the most likely cause?
etcdctl snapshot restore /backup/etcd-snapshot.db --data-dir /var/lib/etcd-newand get the error:
restore failed: open /var/lib/etcd-new/member/snap/db: permission deniedWhat is the most likely cause?
Attempts:
2 left
💡 Hint
Permission denied errors usually relate to filesystem access rights.
✗ Incorrect
The error indicates the process cannot write to the specified directory due to insufficient permissions. Ensuring the user has write access to the data directory fixes this.
🔀 Workflow
advanced2:30remaining
Correct sequence to backup and restore etcd cluster
Arrange the steps in the correct order to safely backup and restore an etcd cluster:
Attempts:
2 left
💡 Hint
Backup first, then stop service before restore, then start service with restored data.
✗ Incorrect
The correct workflow is to first create a snapshot, then stop the etcd service to avoid conflicts, restore the snapshot to a new data directory, and finally start the service using the restored data.
✅ Best Practice
expert3:00remaining
Best practice for automating etcd backups in production
Which approach is considered best practice for automating etcd backups in a production Kubernetes cluster?
Attempts:
2 left
💡 Hint
Consider security, reliability, and minimal disruption in production environments.
✗ Incorrect
Automating backups with scheduled snapshot commands that include authentication and storing backups off-node ensures consistent, secure backups without manual intervention or risking data corruption.