I need to setup a synchronization between my Computers with a NAS in the local network. The setup is somewhat complicated, though, so I am assuming there is not an off-the-shelf product that does what I need.
Devices I use:
- Desktop PC, dual-boot Windows 10 / Arch Linux
- Laptop (Arch Linux)
- NAS (self-build, FreeNAS running on it)
rsync so far to backup to the NAS (one-way, my dual-boot setup uses the same storage for both OS).
The problem is, I would like to get the Laptop in the sync. Therefore I need to do some kind of two-way sync.
Problems that arise here:
I often save files only seconds before the shutdown, so I need to monitor file changes instead of running a sync tool periodically
- I cannot sync my laptop outside of the local network (and in the local network, I use the desktop PC most of the times); the local (updated) version could be quite out of date and give some conflicts.
I do want to use the local network only (probably the existing network share of the NAS), not an ownCloud or something similar, because we have quite limited bandwidth where I live and I have some rather huge files to keep synced.
I found this question: How do I setup rsync and any other scripts to mimic a minimal viable replica of DropBox?, and looked into a solution using lsyncd (Live Syncing Daemon), which synchronizes local directories with remote targets. This could solve problem #1, but I still need to be prepared for conflicts. Furthermore, I could not find any docs about lsyncd on Windows, so I assume it won't work there.
I also looked at the potential to incorporate Unison into a solution; it seems to do two-way syncs. Maybe I could use it together with lsyncd.
I'm not sure about the conflict handling, though. I found a hint that with
-batch, conflicts are just skipped. But how do I handle conflicted files in the long term (I want to sync them, after all)?
So my question is, how can I accomplish this?