Upload only folder

I want to make such a settings whenever I create a new file on the client device will be uploaded to the server, though whenever I delete it on the client it won`t affect the file on the server(won’t delete delete it on the server). It would be a kind a backup copy on the server. I would mainly use it kind of photo auto upload from android client. Please help me!

To have a proper backup, I would personally suggest running some kind of a script on the server to periodically copy or move the files to a different folder. Then, it will not matter whether the user deletes the files or not.

However, if you still want to achieve this within Syncthing only, then please look up https://forum.syncthing.net/search?q=ignoredelete. Remember though that this more of a hack than anything else.

Create a normal Syncthing share for the two devices. Then run a backup software periodically on the server to create a copy of your files. Or just hardlink copy the files within into a separate, unshared directory, if you don’t want to use up more space.

Please do not recommend that option. It is there because it is in use, and thus can’t just be removed, but it’s bad. For some power-users it may be helpful, but especially for people new to syncthing it will only cause confusion and grief. Of course it’s there and I can’t tell anyone what they should write or not, but I can request it and I do - please.

2 Likes

Well, I would not really say that I “recommend” the option. I just think that people will find it anyway, so it is better to give them some information beforehand, especially since the Docs does not really discourage or even warn against using it either.

Please don’t take it as an attack, I know you only have the best of intentions (you show that every time, all the time :wink: ). Obviously I may be wrong: My feeling is that every mention makes it more likely that people discover and use it. And in most cases use it without knowing about the drawbacks.

Agreed, there should be more of a warning than just “Should normally be false” as it is today there.

1 Like

Yeah, I agree and will try to restrain myself from mentioning it without reason, unless someone asks about it directly, especially since I have not and do not plan to use the option myself anyway.

The only situation, where I would consider enabling it, would be if I was running low on space on one device, but did not want to pause the folder. Then, I could (temporarily) delete some of the larger files and still keep the rest being synced. Although, even in this case, simply ignoring the files before deleting them would also probably suffice. Otherwise, I would always deal with the situation on the other side, i.e. the server here.

1 Like

I think the use case the user is talking about is not well suited or implemented in syncthing, and he’s better off using different software, such as unison etc.

I think you are really awesome and very helpful with your really fast forum responses. Thank you about that. Actually I already tried to put “ignoreDelete true” without quotes in the ignore pattern section then I tried ignoreDelete without true but both didnt make any changes. I also did it in client side too. No matter what I did whenever I deleted something in client side it triggered to delete on the server side too. Is that ignoreDelete function deprecated or shouldn`t I use it? On server side using a custom script can be a little pain and not too elegant. Maybe with creating backups with hardlinks in every minutes or so or just relying on zfs auto snapshot, but it would be more elegant just rely on only syncthing to do job.

You run zfs? Go snapshot.
You are using an elegant filesystem already, use its capabilities.

Deprecated? Not really. Shouldn’t you use it? I’d say you shouldn’t :wink:

And if you absolutely insist on Syncthing doing something instead of a script, look into versioning. It’s still not a backup (e.g. definitely less reliable/tested).

1 Like

Just for the record, if you have not already, please visit the documentation:

Everything mentioned here, including versioning and also ignoreDelete is explained there in details.

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