SUSE Support

Here When You Need Us

Migrating Rancher to New Cluster without S3

This document (000021156) is provided subject to the disclaimer at the end of this document.

Environment

Rancher 2.5.0+

Situation

You need to migrate Rancher to a new cluster but do not have access to an S3 endpoint.

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/backups 
Create 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: false
Apply the Restore object
kubectl apply -f restore-migration.yaml
Watch 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: 03-Aug-2023
  • Modified Date:03-Aug-2023
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.