Migrating Rancher to New Cluster without S3
This document (000021156) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Resolution
Copy your backup file onto all the nodes in the new cluster. This is to ensure that the backup-operator can find the file no matter where it is scheduled.
Create a hostPath PV that mounts the directory where you copied your backup:
apiVersion: v1 kind: PersistentVolume metadata: name: migration spec: accessModes: - ReadWriteOnce capacity: storage: 10Gi hostPath: path: /migration-backup type: "" persistentVolumeReclaimPolicy: Retain volumeMode: Filesystem
Install or update the rancher-backup Helm chart on the new cluster, adding the option to use an existing PV with the following options:
--set persistence.enabled=true --set persistence.volumeName="migration"Confirm that the backup operator successfully mounted the hostPath and your backup is present
kubectl -n cattle-resources-system exec deploy/rancher-backup -- ls /var/lib/backupsCreate a Restore object
apiVersion: resources.cattle.io/v1 kind: Restore metadata: name: restore-migration spec: backupFilename: migration-adb5ba4a-ace3-4e53-878b-895170c9615c-2023-08-02T19-43-26Z.tar.gz prune: falseApply the Restore object
kubectl apply -f restore-migration.yamlWatch the Restore logs
kubectl logs -n cattle-resources-system --tail 100 -f -l app.kubernetes.io/instance=rancher-backup
Additional Information
Rancher Migration Documentation: https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/backup-restore-and-disaster-recovery/migrate-rancher-to-new-cluster
Additional Options for to use during the installation of the backup operator can be found here: https://github.com/rancher/backup-restore-operator/tree/release/v3.0/charts/rancher-backup
Disclaimer
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:000021156
- Creation Date: 02-Aug-2023
- Modified Date:03-Aug-2023
-
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com