Send and Delete

I miss a “Send and Delete” synchronization, i.e. it sends files from a selected folder on the phone to another device, and then deletes these files from the phone

1 Like

This is not a mode that Syncthing has, nor will have.

1 Like

This is not a mode that Syncthing has, nor will have.

I’п sorry for reviving this thread after an year. But I need to know why such mode is against the philosophy of Synchthing?

I too would be very happy to have the “Send and Delete” type of folders.

I tried “Send Only” but it has some side effects:

  1. I don’t know when it is safe to delete the original files.
  2. When I delete the files from the “receiver” folder (or move the files outside this folder on the receiver device, after a while Syncthing suggest me to sync the same files again. This way I start to have two versions of the same file which I don’t feel as a good way to organize files.

Now I work with “Send and Receive” type of folders to achieve the “Send and Delete” effect. It works but the problem is when I need to move files from multiple locations to one central location. Like to move all the pictires and videos from two or three phones to one computer where they to be organized and edited. Here the problem is that the phones sync between all the phones not only to the computer. This:

  1. slows the synchronization down.
  2. is not optimized use of resources - a file is sinced to many locations only to be deleted after it is moved away from the folder in the central location.

Would you please tell me why the mode “Send and Delete” cannot be done for Synchtnig?

2 Likes

Wouldn’t it be better to have individual folders per phone? This way, the files wouldn’t be synced between the phones, but only between each phone and the server. Alternatively, you could set the folder on the phones to Send Only, and on the server to Receive Only. This would make each phone upload its files to the server only. Of course, you would still need to check the files on the server whether the upload has finished (manually or perhaps using some kind of an automated script), but at least the resource waste problem would be solved.

I’m sure it could, but it’s not a form of file synchronization, really. Also, it’s error-prone (imagine two devices mutually configured like this) and gets complicated with more than two devices involved.

Because it’s not syncing at this point.

It’s just glorified rsync, which there is no reason to reimplement.

Wouldn’t it be better to have individual folders per phone?

Now I have individual folders per device. Every device has a folder named “inbox DEVICE-NAME”. For example my Mac has “inbox Mac” folder, my son’s computer has “inbox Ivan” folder. My phone has “inbox P30 Lite” folder.

These folders are spread on every other devices so if I want to send files to my Mac, the only thing to do is to put the fiiles in “inbox Mac” on any of the devices.

This make it simple for me. I have only 5 folders which are the same on all devices. I achieved this sameness with using the same ID for the folders in Syncthing. My “inbox Mac” folder ID is “inboxmac”, my “inbox P30 Lite” ID is “inboxp30lite”.

I tried folder types “Send only”. But there was a side effect where when I move files outside of the destination folder, Syncthing suggest me to resync that files. I did this resync several times before I realize that this way it duplicates my files. I don’t like to have multiple versions of the same files. Maybe I have renamed the first ones, may edited them, or just deleted.

I hate to have duplicate files that’s why I search for “move” option instead of “sync”.

Right, and syncthings name is syncthing for that reason.

Too many people try to use it as some sort of continuous rsync.

It’s not that, stop trying to use it as that. It won’t work.

If you find no other tool for this, I feel like you could (ab)use the “Trash Can Versioning” in syncthing.

Deletion on the originating device would need to be done manually after making sure the file is on the target device.

If you want to have more than one target device, I guess you could somehow share the trashcan folder itself…

Also, the solution people seem to envision here could easily be done if someone were to implement some form of this suggestion:

Which is a far more general approach and is more likely to get support from from the main devs, and indeed has been discussed on github

That might be because so many people are unaware rsync exists, or how to use it. Even though rsync is pretty much included with any common Linux distrution, it doesn’t exactly come bundled with a handy Bootstrap web GUI the way Syncthing does — that makes a big difference for the learning curve.

Yeah even me, I’m not aware of rsync having that functionality — the ability to delete files at the source, after confirming the checksums at the destnation?

I hate to revive this topic but as an outsider, I feel that this feature would be useful. I have a heap of dumb cameras gathering footage. They don’t have a lot of storage and are in an insecure location. They are not valuable but I’d rather minimise the amount of footage contained in them. Does rsync work over unreliable networks? Does rsync have a nice web GUI? Is rsync set and forget? Is rsync intrinsically secure?

You can turn that question around and ask the other things that it doesn’t have about syncthing.

Rsync and ssh tunneling in general is considered secure.

Rsync on a cron is a set and forget.

The ui would be useless as it’s not longer syncing stuff, so completion percentages etc would make no sense, making the use of ui questionable.

There are various tunneling software that can help you with connectivity issues etc.

1 Like

A better way of describing this feature request, I feel, is Blind Send. Would it be a duplicate of rsync functionality? Sure, but that doesn’t mean I couldn’t be useful as a feature in syncthing.

Imagine a multi-node environment in a share for a cloud repository is DR synced with a secondary cloud environment via syncthing. This same share is also used to sync segments of the share to multiple worker machines. These worker machine have a privatized workload configuration which offload hundreds of calculations to micro nodes. The micro nodes have a very limited storage allocation, are temporary and therefore are not capable of storing multiple iterations of its own operation. Each operation creates a folder and plethora of data files.

The use case here would be to have a single syncthing share on Master Node. Each DR Node is configured Send/Receive to enable seamless restoration. Each Worker Node is provisioned the share with a not exclude for the specific data stores. Each micro node is provisioned the same share but a not exclude for the specific node folder in this Blind Send mode. The micro node sends the data to the share and does not care about keeping the local storage. The Worker Node manages its data store rotating logs, rotating data, ingesting/sorting and configuring based on sent data. The Master Node maintains a master record of history The DR nodes maintain this same history

This is my use case, I do not want to set up an additional service to handle this functionality because it has the potential of creating disparity in the data and the micro node in this instance is an iPhone.

I think it’ll be so handy and simple to add an option (checkmark) when synchronization set to send only (Keep remote files on deletion) or another checkmark when it is set to receive only (Don’t delete local files on remote deletion) and both checkmarks when set to send & receive

briefly two checkmarks (Send Deletions) & ( Receive Deletions)

Thanks a lot for great syncthing developers