Rancher Custom Cluster etcd backup

Hi Team,

How can I backup/restore the custom cluster that is created on top of HA RKE cluster.

Thanks,

For rke created clusters, rke will automatically create a recurring snapshot by setting properties in the cluster.yml (the docs cover this).

Thanks @Fraser_Goffin. I am already taking backups for the local cluster that is created using rke and cluster.yml.

I read in one of the articles that this backup wouldn’t hold all the data from clusters created on top of the local cluster and we need to take separate backups for each and every cluster.

I was looking at options on taking back ups for the additional clusters. Can you please refer to any docs related to this topic.

Thanks,
Sarma K

I am interested in this as well. I stood up a Rancher Server HA cluster with RKE. RKE is taking snaps/backups of that cluster (which only runs Rancher Server)

I have created additional “custom” clusters within Rancher and need to know the best practice for backing those up. The regular backups of the Rancher Server cluster do not appear to include any additional clusters (docs are not clear on this)

The Rancher management plane cluster won’t backup up Etcd for the application clusters you manage with it, only it’s own.

We don’t use the UI to create app clusters because like many orgs automation is king. We actually use the Rancher Terraform provider. Part of that provisioning actually uses rke properties including those relating to enabling either a snapshot or recurring backup for Etcd.

The process you use to save the pki bundle and data files is the same for all your clusters (we run that as a CronJob to an AWS versioned S3 bucket but YMMV)

Fraser.

@Fraser_Goffin Does it also work with Rancher2 ?

Absolutely, what is more, the rancher2 provider is now fully supported by Rancher themselves (you might recall that this was not entirely the case under v1.x). This is self evident since the resource names have a rancher2_ prefix.

Thus far we have used the rancher2_cluster resource, which also allows various rke service settings that correspond to the cluster.yaml you might use with the RKE K8s installer itself, and the rancher2_auth_config_activedirectory resource for managing AD config.

We found a few anomalies that we have fed back to Rancher which they have turned around promptly.

If you are into IOC I recommend it.

RKE and Rancher now supports also a S3 backup. The problem with the solution is that you are forced to use a separate bucket for each of your clusters. You can mix them in one bucket, but this will bring you a headache, when you want to restore. It will be a good to be possible to use dirs inside the bucket and/or be able to set a prefix. So for now I think it is better to stick to only local backups and cronjob to copy the backup to S3: one and the same bucket for all my clusters but will use a dir named after the name of the cluster. Also I see a backup for each member of the etcd cluster (3 in my case) with timestamps that differ a few seconds. Someone will say what is the problem: more is better ;-). Yes and no. Which one to use for recovery? Any out of the 3, yes and you spend 3 times the space for the backup. Fortunately it is not so much space.