• クラスター全体のバックアップ/リストア ◦ リストア時はクラスター全体のリソースが復元される。 ◦ 1台でもmasterが生きていればリストアできる。 • 注意点 ◦ ストレージ(PV)のデータはバックアップされないた め、リストアできない。 ◦ 特定のNamespaceだけ、など部分的なリストアはで きない。 ◦ 別のクラスタにリストアはできない。 [root@services ~]# oc debug node/master0 Starting pod/master0-debug ... To use host binaries, run `chroot /host` Pod IP: 172.16.0.10 If you don't see a command prompt, try pressing enter. sh-4.4# chroot /host sh-4.4# /usr/local/bin/cluster-backup.sh /home/core/backup/ found latest kube-apiserver: /etc/kubernetes/static-pod-resources/kube-apiserver-pod-20 found latest kube-controller-manager: /etc/kubernetes/static-pod-resources/kube-controller-manager-pod-8 found latest kube-scheduler: /etc/kubernetes/static-pod-resources/kube-scheduler-pod-9 found latest etcd: /etc/kubernetes/static-pod-resources/etcd-pod-4 etcdctl is already installed {"level":"info","ts":1642661012.619663,"caller":"snapshot/v3_snapshot.go:68","msg":"created temporary db file","path":"/home/core/backup//snapshot_2022-01-20_064332.db.part"} {"level":"info","ts":1642661012.6269116,"logger":"client","caller":"v3/maintenance.go:211", "msg":"opened snapshot stream; downloading"} {"level":"info","ts":1642661012.6271513,"caller":"snapshot/v3_snapshot.go:76","msg":"fetchi ng snapshot","endpoint":"https://172.16.0.10:2379"} {"level":"info","ts":1642661013.1581688,"logger":"client","caller":"v3/maintenance.go:219", "msg":"completed snapshot read; closing"} {"level":"info","ts":1642661013.4697661,"caller":"snapshot/v3_snapshot.go:91","msg":"fetche d snapshot","endpoint":"https://172.16.0.10:2379","size":"81 MB","took":"now"} {"level":"info","ts":1642661013.4698682,"caller":"snapshot/v3_snapshot.go:100","msg":"saved ","path":"/home/core/backup//snapshot_2022-01-20_064332.db"} Snapshot saved at /home/core/backup//snapshot_2022-01-20_064332.db Deprecated: Use `etcdutl snapshot status` instead. {"hash":678588886,"revision":36324472,"totalKey":11757,"totalSize":81399808} snapshot db and kube resources are successfully saved to /home/core/backup/ sh-4.4# ls -l /home/core/backup/ total 79576 -rw-------. 1 root root 81399840 Jan 20 06:43 snapshot_2022-01-20_064332.db -rw-------. 1 root root 78742 Jan 20 06:43static_kuberesources_2022-01-20_064332.tar.gz