Summary - Disaster recovery
- Docker & Kubernetes course
- Expert
- Lesson 42/47
- 5 min
Combine snapshot, Velero and RPO to write a recovery plan.
Summary: disaster recovery
In this group:
- Three layers to back up: etcd (objects), PersistentVolumes (data), Git (definitions); the 3-2-1 rule.
etcdctl snapshot saveandetcdutl snapshot status/restore; the snapshot contains Secrets and is stored encrypted.- Velero: namespace-level object and volume backups;
backup create,schedule create --ttl. velero restore create --from-backup, opening for inspection with--namespace-mappings.- RPO is data loss, RTO is downtime; lowered with frequent backups, replication, warm standby and drills.
velero backup get
velero restore create --from-backup gece-20261103020000Practice A drill
Write three commands for a restore drill: switch to the staging-dr context (kubectl config use-context); create a restore named tatbikat from the backup gece-20261103020000; list the pods in magaza.
Starter code
# buraya yazSample solution
kubectl config use-context staging-dr
velero restore create tatbikat --from-backup gece-20261103020000
kubectl get pods -n magazaExpected output
Switched to context "staging-dr". Restore request "tatbikat" submitted successfully. NAME READY STATUS RESTARTS AGE api-7f9c6d5b4-2xkqp 1/1 Running 0 3m veri-db-0 1/1 Running 0 3m
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 How do you know a disaster plan really works?
- By Velero being installed
- By never having a disaster
- With regular restore drills measuring time and data Correct answer
- By looking at the size of the backup files
Explanation: An untested backup may turn out broken when needed.
2 Restore from the backup.
velero restore create ____ gece-20261103020000
velero restore create --from-backup gece-20261103020000
Explanation: --from-backup names the source backup.
3 Match.
| Term | Meaning |
|---|---|
etcdctl |
etcd snapshot |
Velero |
Object + volume backup |
RPO |
Accepted data loss |
3-2-1 |
Copy rule |