Expand/Include more information on how to do rke2 restore for custom clusters
mrolmedo opened this issue · comments
Related Issues
Hi team! In our docs, when we need to proceed with an rke2 restore when all controlplanes and etcd are completely unavailable, we follow this guide:https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/restore-rancher-launched-kubernetes-clusters-from-backup#restoring-a-cluster-from-a-snapshot-when-the-controlplaneetcd-are-completely-unavailable.
Although, It might be worthy to include some more extra information
- Step 2: After all etcd nodes are removed, add a new etcd node that you are planning to restore from.
Can we include that the new node has to be etcd, controlplane and worker?
CF ==> https://support.tools/post/rke2-with-rancher-disaster-recovery/
- Step 3:Restore from an etcd snapshot.
For local snapshots, restore using the UI is not available. In the upper right corner, click ⋮ > Edit YAML. Define spec.cluster.rkeConfig.etcdSnapshotRestore.name as the filename of the snapshot on disk in /var/lib/rancher/<k3s/rke2>/server/db/snapshots/.
2.1 The path, as it is a clean node, does not exist, and it has to be created manually. It might be worth including that.
2.2 Define spec.cluster.rkeConfig.etcdSnapshotRestore.name as the filename of the snapshot on disk in /var/lib/rancher/<k3s/rke2>/server/db/snapshots/.
This led to confusion many times. Usually this is included under the etcd configuration and using the entire path. Can we include a screenshot or something like that?
Thanks for your time.
Summary
Hello @mrolmedo! I am working on a PR to add this information and wanted to clarify the necessary YAML for the etcdSnapshotRestore
configuration. I have as an example the following code block that could be added:
...
rkeConfig:
etcdSnapshotRestore:
name: <string> # Refers to the filename of the associated etcdsnapshot object.
generation: <int> # Changing the generation initiates a snapshot restore.
restoreRKEConfig: <string> # Set to either none (or empty string), all, or kubernetesVersion.
...
Are generation
and restoreRKEConfig
required for the restore, and are there any other variables needed to be set here? Any guidance much appreciated, thanks!
Hello @sunilarjun. I'm on vacation the entire week. I will get you back on Monday, 6th.
Hello @sunilarjun. I'm on vacation the entire week. I will get you back on Monday, 6th.
Sounds good! Enjoy your break!
Hi @sunilarjun
Are generation and restoreRKEConfig required for the restore?
The Generation field is not requiered
The restoreRKEConfig has 3 values when using the Rancher UI to create a restore.
-
none
-
kubernetesVersion
-
all
1 none ==> Equal to restore only etcd
![image](https://private-user-images.githubusercontent.com/96732346/328865483-38d4f8c1-ba78-43e7-b19f-5cc3b7131f87.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMzNTAxMzUsIm5iZiI6MTcyMzM0OTgzNSwicGF0aCI6Ii85NjczMjM0Ni8zMjg4NjU0ODMtMzhkNGY4YzEtYmE3OC00M2U3LWIxOWYtNWNjM2I3MTMxZjg3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODExVDA0MTcxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjY2YwYjFmNjJkMTdkZDZhMWQ3NzE0NWYzOTUzZWE4NTNmYzg0N2I1YWUxOWEwOWNjYjNlMDUyNDNkMDNmYzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PVY5udxG1BrdvJLVJpqavpZhnSkfc3UGu2_rkwr2cOg)
- kubernetesVersion ==> Restore kubernetes version and etcd
![image](https://private-user-images.githubusercontent.com/96732346/328881989-5b1c1b53-f358-4e7f-838e-2ee15425a336.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMzNTAxMzUsIm5iZiI6MTcyMzM0OTgzNSwicGF0aCI6Ii85NjczMjM0Ni8zMjg4ODE5ODktNWIxYzFiNTMtZjM1OC00ZTdmLTgzOGUtMmVlMTU0MjVhMzM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODExVDA0MTcxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBhMjE4ZmNiYzljMDcwYjc0ODQzZDBiN2U0MjgwNjk2MzlkMDk4MGY2YzQwMjA5OWIzMzRjMDEwZmI1ZDZhODcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-IHypxa8UA2BXC6TArE0OH7y5yimehiuWzIbPjl60O8)
- all ==> Restore Cluster config, Kubernetes version and etcd
![image](https://private-user-images.githubusercontent.com/96732346/328881701-b23dc496-fd37-434c-a475-6541508cc574.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMzNTAxMzUsIm5iZiI6MTcyMzM0OTgzNSwicGF0aCI6Ii85NjczMjM0Ni8zMjg4ODE3MDEtYjIzZGM0OTYtZmQzNy00MzRjLWE0NzUtNjU0MTUwOGNjNTc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODExVDA0MTcxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhYjNjNTM1MjE4MjJhOGRlMWVjNjFlMDZjZTlkMmNmMWUzMzBkODZiMDhmOGEzNjIwMTY4NDA5NmU3MjJjODcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.v6FJCQqB27_HEuzUgeQVJ5eyo5o888ONq6lfM-hSfiQ)
I need to do more tests from my side. I will update with more info.
Hi @sunilarjun, regarding step 3, after the tests I´ve done, the only information that has to be included is the name, as the documentation states now:
So, here the change would be only the format for clarity:
rkeConfig:
etcdSnapshotRestore:
name: <string> # Refers to the filename of the associated etcdsnapshot object.
with
rkeConfig:
etcdSnapshotRestore:
name: <string> # Refers to the filename of the associated etcdsnapshot object.