Ignore Delete

It’s widely used (-ish…) so we can’t just remove it, no. But it’s ill considered and has annoying side effects. Nowadays we could probably make something smarter for the same effect.

The way it’s implememented is effectively a checkbox saying “please corrupt my index unrecoverably”. Once you enabled it, disabling it will not suddenly do the right thing, and you’ll be forever out of sync.

It’s possible to reimplement it correctly, but I doubt if it’s on anyones plans. Deprecating it would be done in the next major release, which in it self is not clear when it’s happening, given how much bending over backwards we did not to break backwards compatability.

Ideally, don’t use it, as we want to get rid of it.

2 Likes

@AudriusButkevicius I would understand if you want to replace it with something better. E.g. other sync programs distinguish between bi-directional sync, uni-directional mirror and uni-directional “backup” (mirror with ignoring deletes), which is IMO more convenient than how ST does it. But if you get rid of the third (uni-directional “backup”) option, ST will become almost unusable for me.

For instance, the following scenario I mentioned here in the forum many times:

I use ST for backuping photos from our mobile phones to NAS. I configured ST synchronization as uni-directional “backup”. In ST language it means that the “Camera” folder is set as Send Only at the phone side, and Receive Only + Ignore Deletes at the NAS side. This setup allow me to delete photos from the mobile phone (in order to free the limited storage) without fearing that they will be deleted from NAS as well. How would you do the same without Ignore Delete?

2 Likes

As I said we’re not just going to yank it so there’s no need to argue against that.

Uff, @AudriusButkevicius frightened me.

So back to my original problem. Is this change going to happen any time soon? If not, could it be possible to show the status of Ignore Delete in the folder overview, till then? I understand that you do not want to move the checkbox itself from the Advanced settings.

1 Like

That said, with your send only + receive only setup you already have two “filters” on the sync direction. The only thing ignore-deletes does here is prevent the “revert” button from showing up on the receive only side.

Until ignore-deletes is somehow improved to not be an ugly hack I’m also opposed to making it more visible.

2 Likes

I’d still argue that people using syncthing for uni-directional backup are using the wrong tool.

We don’t officially support that, and the only reason it somewhat works is because of that hack flag that you managed to find buried deep where we don’t want people to see it.

I think it’s best if you find an application that supports this scenario, instead of living in fear that we we’ll remove a hack.

I don’t think we’ll be adding/exposing anything related to ignore deletes in it’s current from, because as it stands it’s 3 lines of code that does terrible things, so adding more convenience for a terrible thing is definatley a nono.

FTR;

(keeping in mind no +1 please)

That doesn’t seem true to me. Without Ignore Delete file/folder removals woud be propagated as well.

I spent quite a long time searching and testing various sync apps that would be cross-platform (work on Win, Android and Synology NAS) and support various sync modes. The fact is that there’s no better app than ST, despite of that ST is not perfect. It offers some unique features that no other app has. In particular, I appreciate that I do not need to use username/password authentication in order to backup devices. Of course, ST is not a backup program.

I do not understand why ST should not support one-directional sync. I understand that bi-directional sync may be sufficient for you, but others may find use of other scenarios as well - including me.

2 Likes

Sorry, you’re of course right about ignore deletes, I was thinking the deletes happened on the other side.

Syncthing is explicitly designed from the beginning to be bidirectional sync and not backup. There are great backup tools out there. Syncthing is not one of them. Over time we’ve bolted on some unidirectional-ish features but it’s never a fantastic match.

@calmh

I know that it is not a backup program. And uni-directional sync is not a synonym for backup :-). Conceptually, there is only a small difference between bi- and uni- directional sync, but there’s a big difference between mere sync and backup.

I know what I’m talking about because a few months ago I implemented uni-directional sync to a (IMO very good) sync script called bsync (https://github.com/xarx00/bsync). Turning a bi-directional sync into a uni-directional was rather a small change. Of course, I do not know the quirks of ST, so fixing uni-directional sync in ST might be a big problem. But my point is that the code for uni-directional sync is only a 1% of the whole code-base. Why to use another tool that has the rest 99% worse than ST?

Edit: If you abandon uni-directional sync, you’ll have to abandon Android as well, because ST can Send Only there.

That’s not actually true, as long as it does not involve SD cards. And I think SD cards are pretty much dead is most modern phones.

Unidirectional sync is not 1% of the code base, it is now, in it’s broken form, but to do it right, I suspect it’s definately more than 1%.

Also this is a side track. Unidirectional is not the problem. Send-only and receive-only both implement unidirectionality.

Ignoring deletes is not about unidirectional sync. It’s about “not-sync” – deliberately not syncing some changes to a file that we are otherwise tracking, regardless of the direction.

2 Likes

When it comes to Android though, I do not think that there is any other open source application that would do this kind of one-way synchronisation.

2 Likes

A contradiction in term, surely?

Don’t try and make a hammer into a screwdriver. Use the tool for the job: sync, ST (brilliant); backup, borgbackup etc (bullet proof}; one-way sync/copy, rsync, rclone etc (proven reliable).

Yes, but the same thing can be said about “Send Only” and “Receive Only” folders, which are integral part of Syncthing (and also exposed in the “normal” GUI).

I do not think that these tools are available for Android, or am I wrong?

Unless you write your own bash scripts and play around with scheduling, which itself requires external applications, as Android does not have any build-in tools like cron, etc. Then you also have to deal with networking, which Syncthing takes care of completely (at least with global discovery and relaying enabled).

Sometimes there is simply no screwdriver available.

2 Likes

From your list I can recognize only ST, borgbackup and rsync/rclone, the others are described too vaguely. Borgbackup is not for Android (there is an attempt), rsync is with limitations. All can be installed on Synology NAS. Borgbackup and rsync use SSH, ST is better in this regard. Also, Borgbackup and rsync are command-line tools, there’s no GUI (at least not for Synology). Etc.

@all But the most important point for me is that I have various kinds of folders (not only photos), and I do not want to use different tool for every type of folder. For instance, I was hesitating whether only to mirror a particular folder to NAS from my notebook, or whether to share this folder with other notebooks and use bi-directional synchronization. If I change my mind, why would I have to use another tool?

ST is advertised as “a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes.”. I do not understand how one-way synchronization contradicts this motto. Wikipedia says (https://en.wikipedia.org/wiki/File_synchronization):

File synchronization (or syncing ) in computing is the process of ensuring that computer files in two or more locations are updated via certain rules.

In one-way file synchronization , also called mirroring, updated files are copied from a source location to one or more target locations, but no files are copied back to the source location. In two-way file synchronization , updated files are copied in both directions, usually with the purpose of keeping the two locations identical to each other. In this article, the term synchronization refers exclusively to two-way file synchronization.

So attempts to persuade us that one-way sync is not a sync are based on bad foundations.

2 Likes

It somehow hurts me every time I hear “ignore delete” and “backup” in one sentence. Ignore delete does not make for a backup. What happens if your phone decides to corrupt the photos? The “backup” (it’s not) gets corrupted. If you want to archive/backup your photos from the phone, the solution is dead simple: Use Syncthing to sync your data, including deleted, to your other device and do backups on that folder, using your favorite backup tool (mine right now is either rsync with some scripting or borgbackup, but restic and kopia look appealing to me too and there’s a myriad of other options).
What would this workflow be missing for you?

1 Like

I think, no one claims that. Concerning photos, your suggestion wouldn’t work for me, because I actually do not use ST for backing up the photos but for incremental synchronization. Photos are not being taken just to be backed up, right? I do it this way:

Photos from the phones are incrementally synchronized (using ST) to NAS for a Photo Album app that we use for viewing the photos (Synology Photo Station). A regular backup program (Synology Hyperbackup) backs up the photos with versioning from the Photo Station to somewhere else (to a backup disk).

Moreover, most backup programs do not have infinite history. If I followed your suggestion, how would I access the old already deleted photos?

1 Like