From 2774c05cfa77b16c58024078e892a4f30969739b Mon Sep 17 00:00:00 2001 From: David Kirwan Date: Jun 24 2021 16:45:48 +0000 Subject: Updated the OCP4 etcd backup SOP Signed-off-by: David Kirwan --- diff --git a/docs/operations/ci/create_etcd_backup.md b/docs/operations/ci/create_etcd_backup.md index d629b36..6241645 100644 --- a/docs/operations/ci/create_etcd_backup.md +++ b/docs/operations/ci/create_etcd_backup.md @@ -6,43 +6,27 @@ This SOP should be followed in the following scenarios: ## Steps -1. Connect to a master node +1. Connect to the admin node for either `staging` or `production`. See the inventory `ocp` for produduction, `ocp-stg` for staging. The hostname is in the group `ocp-ci-management` or `ocp-stg-ci-management`. ``` -oc debug node/ +ssh ``` -2. Chroot to the /host directory on the containers filesystem +2. Become the ocp administrator user, check the hostvars associated with the host in the previous step. ``` -sh-4.2# chroot /host +sudo su ``` -3. Run the cluster-backup.sh script and pass in the location to save the backup to +3. Run the cluster backup script: ``` -sh-4.4# /usr/local/bin/cluster-backup.sh /home/core/assets/backup +~/bin/ocp-etcd-backup ``` -4. Chown the backup files to be owned by user `core` and group `core` - -``` -chown -R core:core /home/core/assets/backup -``` - -5. 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 `ocp_service_account` variable. - -``` -ssh -sudo su - -``` - -6. Copy the files down to the admin machine. - -``` -scp -i core@:/home/core/assets/backup/* ocp_backups/ -``` +4. This will save an etcd snapshot in the `~/ocp_backups` location. +5. These snapshots are taken nightly at `02:00 UTC` and rsynced to a backup storage device. ### Resources