1.1 KiB
1.1 KiB
Init Statemachine
Inputs
restic-password: ""
restic-password-to-rotate: ""
Manual init the restic repository for the first time
- apply backup-and-restore pod:
kubectl scale deployment backup-restore --replicas=1
- exec into pod and execute restore pod (press tab to get your exact pod name)
kubectl exec -it backup-restore-... -- /usr/local/bin/init.sh
- remove backup-and-restore pod:
kubectl scale deployment backup-restore --replicas=0
Password Rotation
- apply backup-and-restore pod:
kubectl scale deployment backup-restore --replicas=1
- add new password to restic repository
restic key add ....
=> Trigger ::
field (1) credential current
filed (2) credential new - replace field (1) with (2) & clear (2)
- remove old key - ???
restic remove ....
stateDiagram-v2
[*] --> init
init --> backup_ready: trigger, restic-password !empty
backup_ready --> new_password_added: restic-password !empty && restic-password-to-rotate !empty
new_password_added --> backup_ready: restic-password !empty && restic-password-to-rotate empty