Create etcd backup
When the need exists to create an etcd backup.
When shutting a cluster down gracefully.
Connect to the
os-control01node associated with the ENV.
octool to make a debug connection to a controlplane node
oc debug node/<node_name>
Chroot to the /host directory on the containers filesystem
sh-4.2# chroot /host
Run the cluster-backup.sh script and pass in the location to save the backup to
sh-4.4# /usr/local/bin/cluster-backup.sh /home/core/assets/backup
Chown the backup files to be owned by user
chown -R core:core /home/core/assets/backup
From the admin machine, see inventory group:
ocp-ci-management, become the Openshift service account, see the inventory hostvars for the host identified in the previous step and note the
ssh <host> sudo su - <ocp_service_account>
Copy the files down to the
scp -i <ssh_key> core@<node_name>:/home/core/assets/backup/* ocp_backups/