Develop a tool for operating with backups
vanyarock01 opened this issue · 1 comments
vanyarock01 commented
The problem is that now you have to make a backup by hand:
for podname in $(kubectl -n $NS_NAME get pods -l tarantool.io/cluster-id=$CLUSTER_ID -o jsonpath="{range .items[*]}{.metadata.name}{''}{end}")
do
kubectl -n $NS_NAME exec -it ${podname} -- sh -c 'echo "box.backup.start()" | tarantoolctl connect /var/run/tarantool/*.control'
done
for podname in $(kubectl -n $NS_NAME get pods -l tarantool.io/cluster-id=$CLUSTER_ID -o jsonpath="{range .items[*]}{.metadata.name}{''}{end}")
do
kubectl -n $NS_NAME cp "${podname}":/var/lib/tarantool ${podname}
done
for podname in $(kubectl -n $NS_NAME get pods -l tarantool.io/cluster-id=$CLUSTER_ID -o jsonpath="{range .items[*]}{.metadata.name}{''}{end}")
do
kubectl -n $NS_NAME exec -it ${podname} -- sh -c 'echo "box.backup.stop()" | tarantoolctl connect /var/run/tarantool/*.control';
donePossible (from the point of view of operation) approach:
- Request a backup of the cluster and get one archive with all pv contents + chart settings.
- On an empty cluster with the operator installed, send the archive for recovery and receive an identical working copy of the cluster.
kluevandrew commented
Won't fix in CE