Yet another Obsidian user with sync problems

I am using Syncthing with a vault between windows and android over Wifi. (BTW: location services to detect the wifi name takes a lot of battery, is there a way to get them without it?)

I get conflict files.

As I understand it, syncthing works on file level, not content level, ie it looks for differences in size, change date, maybe other metadata.

Given that differences in obsidian mean addition and removal of text within the file and the right thing to do is to look at the newest file and merge both, not copy the newest file to the other device and overwrite.

How do I do this with syncthing?

Before doing anything else, are you running the newest version of Syncthing on both sides (which is v1.27.0 at the moment of speaking)?

When it comes to Wi-Fi detection, yes, you do need to have location services enabled. There is no other way. The restriction comes from the Android OS.

I just upgraded to 1.27.0 after I read this on android, so I was using 1.26 before. On Windows it’s now v1.27.0, Windows (64-bit Intel/AMD).

Is “As I understand it, syncthing works on file level, not content level, ie it looks for differences in size, change date, maybe other metadata.” true?

True, however, normally when you change the content, then at least the modified date changes too (even if the size remains the same), which then triggers Syncthing to rescan the file.

I was asking to upgrade to the newest version because of, which was merged not so long ago, however if you were already on v1.26.0 and still getting conflicts, then the culprit is likely something else :confused:. I used to get a lot of conflicts on Android before v1.26.0, but now, there are no conflicts whatsoever.

Well the culprit is the comparison method. Can you add a content comparison just for .md and .txt files, which are as you know non-binary and easy to read?

Syncthing is not content aware and that’s most likely not going to change. I thought there was a proposal to add hooks to allow specifying an external tool for merging. Though that would be non-interactive. The closest I found is this ticket: External conflict handling tool (to merge, or select winner) · Issue #1746 · syncthing/syncthing · GitHub

which tool do you recommend for my task other than syncthing?

Keep in mind that if the action is to “look at the newest file and merge both”, the end result will be that any text that was removed in the newest version of the file – but still exists in the older version – will be effectively undeleted. For a note taking app such as Obsidian, it’s likely not what most users would want/expect to happen.

What you need is a revision control tool. Search online for “git sync obsidian” for tips on using Git (which has a merge feature).

1 Like

I don’t understand what’s so special about Obsidian. Why do we need to merge?

For me the files are synchronized without any problems, even if I open the same file on my desktop and phone at the same time.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.