Skip to content

Instantly share code, notes, and snippets.

@pichuang
Created February 19, 2021 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pichuang/216d6c0a400846f9be76b25a455f342e to your computer and use it in GitHub Desktop.
Save pichuang/216d6c0a400846f9be76b25a455f342e to your computer and use it in GitHub Desktop.
OCP 4.6.8 ETCD Restore
#!/bin/bash
BACKUP_DIR="~/etcd_backup/backup/backup.epq0825v"
master_nodes=(master0.dmz.ocp4.local master1.dmz.ocp4.local master2.dmz.ocp4.local)
cd $BACKUP
for node in "${master_nodes[@]}"
do
scp -i ~/.ssh/dmz-ocp4-rsa $BACKUP_DIR/* core@$node:~/
ssh -i ~/.ssh/dmz-ocp4-rsa core@$node sudo /usr/local/bin/cluster-restore.sh /home/core/
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment