Courseiva

CKA Practice Question: Cluster Architecture, Installation and Configuration

You have taken an etcd snapshot using 'ETCDCTL_API=3 etcdctl snapshot save snapshot.db'. Which TWO commands are needed to restore this snapshot to a new etcd member? (Choose TWO.)

⚠ Common exam trap

Many exam-takers confuse snapshot status or health checks with actual restoration steps, forgetting that `snapshot restore` must be followed by updating the etcd configuration and restarting the service to make the restored data active.

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

✓

Update the etcd configuration (e.g., --data-dir) and restart the etcd service

Option D is correct because 'etcdctl snapshot restore snapshot.db --data-dir=/var/lib/etcd-restore' is the actual command that rebuilds the etcd data directory from the saved snapshot, writing a fresh member's data into the specified --data-dir. Option C is correct because after restoring the snapshot to a new data directory, the etcd member's configuration (for example the --data-dir flag in the etcd unit file or manifest) must be pointed at that restored directory and the etcd service restarted so the new member starts from the restored state. Option A ('etcdctl endpoint health') only checks cluster endpoint health and does not perform any restore action. Option B ('etcdctl snapshot save backup.db') creates a new snapshot rather than restoring one. Option E ('etcdctl snapshot status snapshot.db') only reports metadata such as hash, revision, and total keys in the snapshot file and does not restore it.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    etcdctl endpoint health

    Why it's wrong here

    This command checks the health of etcd endpoints by issuing a health status request to the etcd server. It does not interact with snapshot files or the data directory, so it cannot be used to restore a backup. It is useful for verifying that the etcd cluster is responsive before or after a restore, but it plays no role in the restore procedure itself.

  • ✗

    etcdctl snapshot save backup.db

    Why it's wrong here

    This command creates a new snapshot of the current etcd data by streaming a consistent point-in-time backup to the specified file. It is the backup operation, not the restore operation, and it actually overwrites the target file with fresh data rather than applying a previously saved snapshot. If you run this after a failure, you would capture the current (possibly corrupted) state instead of recovering from an earlier snapshot.

  • ✓

    Update the etcd configuration (e.g., --data-dir) and restart the etcd service

    Why this is correct

    After restoring a snapshot to a new directory, you must point etcd at that directory by modifying the --data-dir flag or the corresponding etcd manifest environment variable. If you omit this step, etcd will start using its original data directory and the restored data will be ignored. Additionally, you may need to update the --initial-cluster and --initial-cluster-token to match the restore's --name and new cluster ID to avoid conflicts.

  • ✓

    etcdctl snapshot restore snapshot.db --data-dir=/var/lib/etcd-restore

    Why this is correct

    This command takes a snapshot file and reconstructs a new etcd data directory in the specified location. The restore creates a new cluster ID and node ID, so the command requires --name and optionally --initial-cluster to define the new cluster membership. After running this, you must point etcd to this new directory and restart the service; simply running restore alone does not start etcd or change the running cluster.

  • ✗

    etcdctl snapshot status snapshot.db

    Why it's wrong here

    This command displays metadata about a snapshot file, such as the revision, total key count, and snapshot hash, to verify the snapshot's integrity and contents. It does not modify any etcd state, nor does it copy files back into a data directory, so it cannot be part of a restore workflow. It is a diagnostic tool, and while checking a snapshot's status is a good pre-flight check, the actual restore requires the snapshot restore subcommand.

About these practice questions

Courseiva writes every CKA question from scratch — 726 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 →

How Courseiva writes practice questions · Editorial policy

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.