ignoreDelete and recreating files


I turned on ignoreDelete for a folder and I see some behavior that seems very undesirable. I have two PC’s (PC1 and PC2) with a shared folder. This is use case:

PC1: -ignoreDelete=yes

PC2: -ignoreDelete=no

PC1: -Create a file test.txt with some content

PC2: -File shows up fine

PC2: -Delete test.txt

PC1: -File not deleted (as expected)

PC2: -Recreate test.txt with different content

Expected behavior: -Conflict

Actual behavior: -PC1 test.txt overwritten by contents of file from PC2


If PC2 is not Receive-Only that’s kind of the expected behaviour.

and there is no plan to change this? It is very dangerous behavior IMHO. Easy to lose data. The whole reason I wanted to use ignoreDelete was to ensure data is not lost if something is accidentally deleted on the other PC. But with this behavior it gets very difficult to manage.

What is the reasoning behind this behavior?

Well, it does prevent data loss in case you accidentally delete a file, doesn’t it? But what you’re describing further is no longer an accidental delete, it’s an intentional rewrite.

Syncthing is a file synchronization software, and as such its purpose is to make sure that at all times PC1 and PC2 have the same set of files. This behaviour can be altered in three ways:

  1. Ignore deletes does just that: ignore deletes. If a file is changed, it is synchronized. If a file is deleted on one machine, it is not automatically deleted on other machines.

  2. Receve-Only - the machine receives all changes from other machines, but doesn’t send its own changes to them. In this case, if your PC2 is Receive-Only, and you change/delete/rename/whatever you file on PC2, PC1 doesn’t even know about it. However, if you change that same file on PC1, there will be a conflict on PC2 (and no conflict on PC1).

  3. Send-Only - the machine ignores all changes made elsewhere. If your PC2 is Send-Only, and PC1 changes or deletes a file, PC2 would ignore it. If the same file gets changed on PC2, PC1 will have a conflict (and PC2 will not).

It’s important to understand that Syncthing is a file synchronization software, not a backup solution or a version control system.

The edit history for the file is linear so there is no conflict that I see. One of the steps, the delete, weren’t acted upon, that’s all. A conflict would occur if the file was simultaneously edited with different contents on two sides.

1 Like

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