Kubernetes volume snapshot Vs. sql backup?

2/22/2019

I am running database inside Kubernetes pod. i am planning to run K8s job to take automatic backup of databases from pod.

There is also i can write shell script to take snapshot of volume(PV).

which method will be better to use? in emergency which one will save time restore data ?

-- Harsh Manvar
database
docker
kubernetes
snapshot
volume

1 Answer

2/22/2019

You can use Stash by AppsCode which is a great solution to backup Kubernetes volumes.

For supported versions check here

Stash by AppsCode is a Kubernetes operator for restic. If you are running production workloads in Kubernetes, you might want to take backup of your disks. Traditional tools are too complex to setup and maintain in a dynamic compute environment like Kubernetes. restic is a backup program that is fast, efficient and secure with few moving parts. Stash is a CRD controller for Kubernetes built around restic to address these issues. Using Stash, you can backup Kubernetes volumes mounted in following types of workloads:

Deployment, DaemonSet, ReplicaSet, ReplicationController, StatefulSet

After installing stash using Script or HELM you would want to follow Instructions for Backup and Restore if you are not familiar

I find it very useful

-- coolinuxoid
Source: StackOverflow