Move existing data into longhorn

Hi,

I have data in PV from an existing storage class. I am wondering how i can move that into Longhorn. Any help would it be good. Many thanks

You can try:

  1. You have an old PVC with old volume data
  2. Create new PVC using longhorn StorageClass
  3. Deploy this example data migration pod to copy the data from old PVC to the new PVC.
1 Like

I can highly recommend Velero for this as good alternative if needed. We had recently use case to move PVs between clusters and it went smooth with broad customization possibilities.

1 Like

You can use purpose-built solution from Trilio (TrilioVault for Kubernetes) to achieve this very easily.
If you are using Rancher Server 2.5 or higher, TVK is provided in the Rancher catalog as a certified chart.

https://docs.trilio.io/kubernetes/overview/getting-started
https://docs.trilio.io/kubernetes/architecture/custom-resource-definitions-application-1/triliovault-crds#example-6-restore-with-transformations-storageclass

1 Like