Replies: 1 comment
-
|
@justyns You could try taking a look at the VolSync volumepopulator: https://volsync.readthedocs.io/en/stable/usage/volume-populator/index.html The volume populator lets you create a PVC that points to a replicationdestination (the replication destination must be using snapshot as the volume mode). The PVC will then get populated with the snapshot on the replicationdestination (so this will be the latest available snapshot at the time you create the PVC). My understanding is that stateful sets will pickup existing PVCs (assuming you've named them correctly), so you could possibly do the following:
The PVCs will not be available for use/mounting until the volsync populator has completed the job of populating the volume from the snapshot. Since this seems to be node related, you may need to make sure your PVCs are using a volumeBindingMode of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to have the latest backup automatically restored whenever a (statefulset) pod is created?
For example, some workloads I want to migrate away from longhorn and use local-hostpath for performance reasons. I want to back up the local volume once an hour, and then if the pod gets destroyed and re-created on a different node - I want the backup to be restored before starting the pod. It's okay if there's some data loss from only backing up once an hour.
I'm guessing I might be able to do this with an init container on my own, but am hoping there's an easier/cleaner way.
Beta Was this translation helpful? Give feedback.
All reactions