Restore k3s from MySQL dump
This document (000020803) is provided subject to the disclaimer at the end of this document.
- In the new MySQL instance create a database
- Here we set the Character set to latin1 and collation to latin1_swedish_ci, as the original DB
- we also chose the same name, as it is a new instance
- Restore the dump, you may use mysql db_name < backup-file.sql
- on the first node start k3s with:
- curl -sfL https://get.k3s.io | sh -s - server --token <SERVER-TOKEN> --datastore-endpoint="mysql://<USERNAME>:<PASSWORD>@tcp(<INSTANE-NAME>.mysql.database.azure.com:3306)/<RESTORED-DB>?tls=true"
- the token is retrieve from the failed cluster in /var/lib/rancher/k3s/server/token
- Remove the failed nodes running:
- k3s kubectl get nodes
- k3s kubectl delete nodes <FAILED-NODE>
- Join any additional node using the instructions from k3s documentation
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020803
- Creation Date: 14-Dec-2022
- Modified Date:14-Dec-2022
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com