I need to add files only, so remote host (which is receive only) should create files only once (not update it).
It means if local copy is damaged (updated) accidentally then remote copy will not be affected.
In normal situation files should be read and added only, so never updated or deleted. But I have to directly disable such possibility.
I can try to achieve that by FS permissions. But on Linux I have to run additional commands after file creation (not sure if Syncthing can do that), and not clear how Syncthing will work with IO error due to permissions.
It will not work because SSH will allow to update\delete files.
In addition it will require maintenance of 2 separate ways to connect remote host.
Why is ignoreDelete present but ignoreUpdate not? If delete is ignored to keep files then their content still can be damaged by writing to file. In other words it can be truncated to zero.
Alternatively I can try to enable version history. So I will be able to find all required files there.
Versioning could help, but I’m not sure there is a versioning strategy that guarantees the original version is kept forever if there are a thousand updates to a file subsequently.
But OK, what is the alternative?
How to achieve desired behaviour? How to protect one-way copied files?
If even versioning cannot keep versions forever…
Can Syncthing apply command to target of synchronization when process finished?
It there any way to subscribe to sync events?
P.S. I am trying to use it in real-world scenario and I am very “unlucky” with Syncthing.
I’d suggest External Versioning in this case. This way you can write your own scripts to handle the files, so that nothing will get deleted without your explicit permission.
martinleben, rsync needs SSH, providing SSH access makes remote backups not immutable, SSH allows to connect to remote and damage whatever, so if local copy is compromised then remote is compromised as well.
I do not use Syncthing for backups, I simply need a remote copy of files which are immutable and should not be deleted by source.
It is not true. Folder types: Send/Receive allow to make it unidirectional.
So I just asked about more control over sync process.
In addition to make it receive only I need to make it immutable.
In other words “Receive Once”.
Because you suggest to give access via SSH. It is dangerous, at least considering what I wrote in topic of this thread. So that ruins original idea to have “Receive Once” (or ignoreUpdate). With SSH you can do whatever, so somebody can read that and consider as real alternative but it is not.