A question re using volsync with syncthing to provide a remote copy #956
-
Hello, First let me thank you for the project. I think that volsync is an incredibly useful tool. I was about to try to dodo somehting manually with syncthing when I discovered volsync. I do however have a couple questions about how to best use it. I need to do a rapid sync to a remote location and from what I have read, my experiments so far and after reading the docs for the docuwiki example, it looks like I have to setup a local sync with my application volume and then add the remote as a peer. Is this the only way to make this work? We have >100GB of files that need to be synced to a remote location and it seems to me that this approach would require that I maintain a local source volume what syncs both with the remote and the pod volume (and thus would require that I provision an extra 100GB local volume). Is it possible to sidecar volsync so that the pod/app volume is the same as the volsync volume? This way I only need a single 100GB volume locally, which I can sync to the remote location. In other words, can the volsync/syncthing and app volumes be the same? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
When using Syncthing, we recommend that you do, in fact, sync the application's actual PVC, not a snapshot/clone. That way, you get the latest data sent across as soon as it's written (well, as soon as syncthing notices). When you configure the ReplicationSource(s), make sure you use Thanks for asking about this... in a quick check of the docs, it looks like we never mention setting this. 🤦♂️ |
Beta Was this translation helpful? Give feedback.
-
Something was bothering me about this one - was almost going to create an issue to update the docs and mention direct mode... But - I think for Syncthing it's going to essentially use Direct CopyMode by default - taking a bit of a look at the code it doesn't use the volumehandler at all for the sourcePVC (aka dataPVC in the snippet below), and will just check that the sourcePVC exists (and then use it directly) - so I believe using CopyMode: Direct is not necessary and in fact ignored by the Syncthing mover. volsync/controllers/mover/syncthing/mover.go Lines 287 to 300 in dad17ec |
Beta Was this translation helpful? Give feedback.
When using Syncthing, we recommend that you do, in fact, sync the application's actual PVC, not a snapshot/clone. That way, you get the latest data sent across as soon as it's written (well, as soon as syncthing notices).
When you configure the ReplicationSource(s), make sure you use
copyMethod: Direct
. This will avoid taking snapshots/clones and have VolSync just use the app's PVC as the source.Thanks for asking about this... in a quick check of the docs, it looks like we never mention setting this. 🤦♂️