Hey everyone! I'm looking for the best strategies to back up my Rancher Local cluster. I think using "Rancher Backups" should do the trick, and for the downstream clusters, I'm utilizing the etcd Automatic Backup tools that Rancher provides—those seem to work quite smoothly with S3. However, I've never actually tried to restore an etcd backup, so I'm a bit unsure about that.
Additionally, I have some applications, like ArgoCD, Longhorn, ExternalSecrets, and Cilium, all configured via Rancher Helm charts. What's the best way to ensure their configurations are backed up properly? Do I just need to save the necessary CRDs, ConfigMaps, and Secrets using Velero, or is there an easier approach?
Lastly, regarding backing up persistent volumes (PVCs) and persistent volume claims (PVs) using Velero and Longhorn, I've had success with it, but restoring specific PVCs and PVs seems tricky. Should I set up an individual backup for each PV instead?
4 Answers
It's best to back up all Kubernetes resources, including CRDs, ConfigMaps, and PVCs, since you can't predict what you'll need later. Velero can handle basic backups, but it struggles with restoring specific PVCs. If you want more advanced solutions, check out CloudCasa; it offers easier resource-level and file-level restores, along with cluster migration features.
I've been using Velero for backing up both Rancher and the downstream clusters, and it works great for me!
If you need to restore just one specific PV, is that even an option with Velero?
Rancher keeps all its persistent data in ConfigMaps. Pair Velero with relevant CSI snapshots and export your snapshots to something like MinIO outside the cluster. Once you've got that set up, you can use Velero backups alongside Kopia to cover your other apps, including those using PVs.
If you’re using ArgoCD, you probably have everything backed up in your git repository, right? If you’re not, you should really consider it.
Yes, I manage some apps with ArgoCD, but I still need to ensure I'm backing up the CRDs and ConfigMaps for Argo, Longhorn, Cilium, and ExternalSecrets.
Thanks a bunch! I’ll definitely take a look at that for my backups!