Files
kubernetes/cmd
SEPURI-SAI-KRISHNA 8606006f18 kubeadm: fix etcd data rollback and retry the etcd backup
The etcd data dir is backed up with "cp -r <dataDir> <backupDir>" into
an existing backup dir, so the data lives in <backupDir>/<basename>.
Rolling back with "cp -r <backupDir> <dataDir>" copied the backup dir
inside the data dir and left the live data untouched.

Replace the cp and xcopy variants of CopyDir with one portable Go
implementation that copies the contents of src and keeps the source
file modes. Remove the member dir before restoring so files written
since the backup do not survive, and refuse to clear it at all unless
the backup has a member dir to restore from.

The backup copies the data dir of a running etcd, so it can fail when
etcd renames a WAL file during the copy. Retry it for up to 30 seconds,
starting from an empty backup dir each time.
2026-10-26 16:31:27 +05:30
..
2026-10-22 13:34:00 -04:00
2026-10-14 18:12:16 +03:00
2026-10-22 13:34:00 -04:00