CKA Practice Question: Cluster Architecture, Installation and Configuration
An administrator backs up etcd data using 'ETCDCTL_API=3 etcdctl snapshot save /backup/etcd-snapshot.db'. Which command correctly restores this snapshot on a new etcd instance?
⚠ Common exam trap
CNCF often tests the exact subcommand syntax, so candidates mistakenly choose `etcdctl restore` or `etcdctl snapshot load` instead of the correct `etcdctl snapshot restore`.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
etcdctl snapshot restore /backup/etcd-snapshot.db --data-dir=/var/lib/etcd-restored
`etcdctl snapshot restore` is the proper command to restore an etcd snapshot to a new data directory. The `--data-dir` flag specifies where the restored data should be placed, allowing the new etcd instance to use that directory. This command recreates the etcd member's data from the snapshot file, which is essential for disaster recovery.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
kubectl apply -f /backup/etcd-snapshot.db
Why it's wrong here
kubectl apply -f is a Kubernetes resource-management command that sends manifests to the API server to create or update objects. An etcd snapshot file is a raw database backup, not a YAML/JSON manifest, so kubectl has no schema or resource kind to parse it; attempting this would produce an error like 'unable to decode' and would not touch etcd storage.
- ✓
etcdctl snapshot restore /backup/etcd-snapshot.db --data-dir=/var/lib/etcd-restored
Why this is correct
etcdctl snapshot restore is the correct command because it takes a previously captured snapshot file and reconstructs a new etcd data directory. The --data-dir flag points to the location where the restored database files should be written, and the etcd server must later be configured to use that directory; this is the canonical procedure for restoring etcd in Kubernetes control-plane recovery.
- ✗
etcdctl snapshot load /backup/etcd-snapshot.db
Why it's wrong here
etcdctl snapshot load is not a valid etcdctl subcommand in API version 3. The snapshot command group only has 'save' and 'restore' actions; 'load' is either a typo or a legacy v2-era concept that does not exist in the v3 API, so this would fail with an unknown-command error and would not perform any restoration.
- ✗
ETCDCTL_API=3 etcdctl restore /backup/etcd-snapshot.db
Why it's wrong here
The command ETCDCTL_API=3 etcdctl restore is incorrect because 'restore' is not a top-level subcommand of etcdctl — it lives under the 'snapshot' subcommand. While setting ETCDCTL_API=3 is necessary for etcdctl to use the v3 API, the correct syntax must include 'snapshot restore'; using bare 'restore' is invalid and will be rejected by etcdctl.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKA question from scratch — 302 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKA exam.