Hi,
short update from our side. Our goal was it to have a lightweight solution without using a dedicated backup solution.
Here are our findings:
Korb
https://github.com/BeryJu/korb
Nice small tool that uses rsync for pvc migration and an temporary pod that mounts both the old and new pvc for data migration.
It even supports the following scenario:
- migration of data to new PVC
- deletion of source PVC
- migration of data from new PVC to initial PVC name (but now on another storage class)
Therefore you do not need to recreate the STS (VolumeClaimTemplate is immuteable) or update the Deployment.
Unfortunately the implemented hardcoded rsync configuration tries to fix the timestamps on the files that it copies over, which is not possible when using NFS. Permissions are taken over. As we can not deactivate the timestamp "recreation" under NFS it is not useable for our usecase.
PV Migrate
https://github.com/utkuozdemir/pv-migrate
Same as Korb, but with much more configuration options (e.g. rsync). Unfortunately misses the feature to automatically copy the data twice to persist PVC names accross workloads.
In worst case one can trigger it twice to receive the same functionality.
BR,
Philipp