Backup etcd database via /proc/PID/root

I am preparing for the CKA exam: backup etc database.

I tried to find a an easy solution, and came to this one:

Get shell access to the node running etcd. Then ps aux| grep etcd

Then you see the PID and the files which the etcd server uses.

Then you just need to change the command-line arguments
of etcd a bit to get the matching etcdctl command.

ETCDCTL_API=3 etcdctl --endpoints https://192.168.178.47:2379 \
    --cert=/proc/1493/root/etc/kubernetes/pki/etcd/server.crt \
    --key=/proc/1493/root/etc/kubernetes/pki/etcd/server.key \
    --cacert=/proc/1493/root/etc/kubernetes/pki/etcd/ca.crt  \
    snapshot save snapshotdb

Is this a valid approach, or has it flaws?

Hey Thomas, I used the link below during my preparation. It’s also accessible during the exam. Practice it multiple times and you should be good to go.

1 Like

Just to be clear - using this forum during the CKA/CKAD exam is grounds to have the exam terminated and revoked. It is not allowed to be used during the exam.

1 Like

I thought everything on kubernetes.io is allowed.

ONLY the kubernetes.io website, subdomains are not allowed.

Everything under kubernetes.io is allowed.

NO it is not - see here where its explicitly listed as NOT allowed

" No other tabs may be opened and no other sites may be navigated to (including https://discuss.kubernetes.io)."

See the docs here:

2 Likes

Thank you very much! I was not aware if the fact that the discussion forum is not allowed.

Thanks for posting. Thomas, you should be able to use that link to practice for your exam.