# Move existing data into longhorn

**URL:** <https://forums.suse.com/t/move-existing-data-into-longhorn/20017>\
**Category:** SUSE Storage\
**Created:** [April 8, 2021, 4:03pm UTC](https://forums.suse.com/t/move-existing-data-into-longhorn/20017 "2021-04-08T16:03:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![weiyentan](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/weiyentan/32/6794_2.png) [@weiyentan](https://forums.suse.com/u/weiyentan)\
**Post date:** [April 8, 2021, 4:03pm UTC](https://forums.suse.com/t/move-existing-data-into-longhorn/20017/1 "2021-04-08T16:03:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PhanLe0110](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/phanle0110/32/7022_2.png) [@PhanLe0110](https://forums.suse.com/u/PhanLe0110)\
**Post date:** [April 12, 2021, 8:17pm UTC](https://forums.suse.com/t/move-existing-data-into-longhorn/20017/2 "2021-04-12T20:17:41Z")

</div>

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](https://github.com/longhorn/longhorn/blob/master/examples/data_migration.yaml) to copy the data from old PVC to the new PVC.

---

<div class="post-metadata">

**Author:** ![8YdEo37](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/8ydeo37/32/7306_2.png) [@8YdEo37](https://forums.suse.com/u/8YdEo37)\
**Post date:** [April 13, 2021, 7:20am UTC](https://forums.suse.com/t/move-existing-data-into-longhorn/20017/3 "2021-04-13T07:20:26Z")

</div>

I can highly recommend [Velero](https://velero.io/) 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.

---

<div class="post-metadata">

**Author:** ![Prashanto\_Kochavara](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/prashanto_kochavara/32/7363_2.png) [@Prashanto\_Kochavara](https://forums.suse.com/u/Prashanto_Kochavara)\
**Post date:** [April 13, 2021, 10:32pm UTC](https://forums.suse.com/t/move-existing-data-into-longhorn/20017/4 "2021-04-13T22:32:01Z")

</div>

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/overview/getting-started)  
[https://docs.trilio.io/kubernetes/architecture/custom-resource-definitions-application-1/triliovault-crds#example-6-restore-with-transformations-storageclass](https://docs.trilio.io/kubernetes/architecture/custom-resource-definitions-application-1/triliovault-crds#example-6-restore-with-transformations-storageclass)
