No file conflict created - data loss

I had an updated file on my desktop and opened that same file on my laptop to take quick notes. I saved the file on my laptop, which I’m guessing overwrote the file on the synced folder, losing the updates I made on that file over the last week on my desktop. Usually when this has happened in the past, I would see a conflict file in the folder, but this time there wasn’t. Is there any way to recover that data that I lost?

I’ve already checked for temporary files created by Microsoft Word in AppData\Roaming\Microsoft\Word and AppData\Local\Temp. And also turns out I did not have file versioning turned on–thought it was on by default. I’m scanning the drive with Recuva as a last resort, but if anyone else has any better ideas, I will kiss your feet.

I’m not sure why Syncthing would see a conflict if you edited a file on one Device. Conflicts happen when Syncthing sees the same file changed at the same time.

It’s not clear to me how you suffered data loss here; was the file on your desktop not saved?

It was definitely saved. It was a Word Doc and I wrote like 4 pages throughout the week. I had turned the computer off, turned it back on, and continued working on it with no issues. It was only after I used my laptop to make those notes that this happened. I came back to my desktop two days later, opened the file, and it was all gone. That’s the only reason that I could come up with, unless you have any other ideas?

One of my main use cases for Syncthing is as you describe: Edit a file on one Device, save it, later edit it on another Device, and so on. Unless I save on two or more Devices simultaneously the latest save should always “win.”

It’s not clear to me at all what happened here.

So I don’t really use my laptop on a daily basis. When I opened that very file on my laptop, the file wasn’t synced/up to date with all the changes I had made throughout the week because I hadn’t used my laptop in a while.

I’m guessing that when I hit save on my laptop (which remember this file did not have the updates I had made throughout the week I just opened the file to make quick notes) this overwrote the save.

When I opened that file on my desktop days later, it had the notes I had taken during my meeting but not the four pages of updates I had made over the last week.

Do you get it now?

Sounds like your laptop wasn’t in sync when you saved the changes. That makes sense.

Yeah I think a reasonable question why the desktop version wasn’t tagged as a conflict and renamed.

In general conflicts should be a safety measure and in my mind had I noticed the file didn’t have the week’s updates I would have closed the file without saving and waited till the file was copied over.

But still I agree, at least based what you stated, it sounds like the conflict file should have been retained.

If this is a regular occurrence for you, you may consider turning on some sort of file versioning.

If I understand the events correctly, it went like this:

  1. The file was edited on one Device
  2. The file was edited on another Device before the file had synced to it
  3. The latest edit “won” and there was no conflict

How could Syncthing prevent this from happening? File versioning is certainly a good option. But I can’t come up with logic that Syncthing could use to figure this out that wouldn’t cause a massive increase in conflicts.

When syncthing negotiates the global state upon reconnection syncthing should detect the file which was previously synced as of a certain date and time had two separate machines modify the same file. With two machines having modified the file since the last sync, syncthing should have identified a conflict and renamed one of the files rather than destroying one.

This is the whole point of conflict handling.

That’s not how I read Understanding Synchronization — Syncthing documentation.

The logic you posit seems like it would have the local Device track changes in synced files until the Global Model catches up.

How does Syncthing determine that the Global Model is up to date on all Devices?

What happens if another Device is offline for a long time?

Unfortunately it seems like a complex problem to solve, at least to me.

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