How to accept local changes

I have Syncthing installed on my Synology NAS server, and I synchronize photos (and other data) from mobile phones and other devices. The synchronization is uni-directional: phone -> NAS (receive-only, ignore delete).

There are two common situations when Syncthing unnecessarily reports “locally changed items”. Is there a way to “accept local changes” instead of “revert local changes”?

  1. Once a while (on NAS) I move the synchronized photos from Syncthing folders to photo folders where I sort them out. Syncthing then signals “locally changed items” in the Syncthing folder (referring to the deleted files), and offers a red button to revert the changes back.

  2. I had an old mobile phone from which I used to synchronize photos to NAS. Recently I replaced the old phone with a new phone and set up synchronization of photos to the same Syncthing folder as before. Now, Syncthing (on NAS) shows status of the new device (i.e. of the new phone) permanently as “Syncing, 3%, 8GiB”. And shows that there are plenty of “out-of-sync items”. These are those photos that were synchronized from the old phone, and were never synchronized to the new phone.

As the synchronization is set up as one-way, there’s no reason why Syncthing should report local changes at NAS. Is there an easy way how to tell Syncthing that these local changes are to be accepted? I tried --reset-database with --reset-deltas, but without success.

No, there is no way to “accept” changes, as that would mean they would need to be sent to others, making it not “receive only”.

Perhaps what you want is actually sendreceice and sendreceive and the ignore deletes flag that is only accessible from advanced configuration.

Well, SendReceive could help, that’s a good idea. In this case, I think it wouldn’t make any harm when I allow the synchronization from server to phones.

I wanted to avoid synchronizations from server to phones in order to prevent reappearance of photos already deleted from the phone. But as the folders at the server do not contain all photos, only those that have been already synchronized from that particular phone, bi-directional synchronization (with “ignore delete”) might work.

Thank you for the suggestion.

After allowing bi-directional synchronization both on my phone and the NAS server, I’ve got to another problem - the Syncthing folder on NAS became out-of-sync. It shows there are thousands of out-of-sync items with total size 0B. When I click on the detail of the out-of-sync items, it shows a dialog with 200 pages, but each page is empty (no item is shown there)!?! –reset-dictionary didn’t help.

Is there any help that describes how to handle various synchronization errors?

As far as I understand Syncthing, there are several places in the Syncthing chain where out-of-sync may happen:

  1. When I modify the files, the Syncthing folder gets out-of-sync with locally-changed items. And if the folder is “receive only”, it stays out-of-sync.
  2. When the Syncthing folder is not “receive only”, it passes the out-of-sync items for synchronization to the Syncthing remote devices. The Syncthing folder gets up-to-date, but the Syncthing remote devices get out-of sync. Until the Syncthing device is synchronized with Syncthing on the real remote device, it will stay out-of sync.

3., 4. the same problems may happen upon retrieval. But I do not understand this part. And this is probably what happened in my case.

Did you ignore permissions on Synology? Permissions are royally borked on Synology so it’s best to ignore there (I am negatively biased towards Synology in general, but I believe that statement is fair).

And out of sync items with nothing displayed in the opened list definitely sounds wrong. Can you post a screenshot for starters.

1 Like

@imsodin: Yes, permissions are ignored.


1 Like

That is screwed in other ways too: local state is much bigger than global state. What version are you on? Has this folder ever been send-/receive-only? And finally could you post logs please.

Since its creation, this folder at NAS was receive-only with ignore-delete, and its counterpart in the phone was “sent-only”. The synchronization was set up more than a year ago, and was used the way I described in the scenario 1.

That is, new photos were synced from the phone to NAS, and from time to time I moved the synced photos from the Syncthing folder at NAS to a photo folder. From the Syncthing perspective the files were deleted. This worked fine until yesterday, when I changed the unidirectional synchronization to bidirectional. Immediately, the Syncthing folder at NAS became out-of-sync with the problems we’re just talking about. In the phone, however, the folder looks synchronized.

Syncthing at NAS: v1.4.0, Linux (64 bit)

Syncthing at Android: v1.3.4

I’ll try to post the logs in the next post.

1 Like

After that I suspected that switch to be the cause. However re-reading the OP I see:

Can you confirm that you have reset the db on the NAS after switching the folder to send-receive and the same problem happened again.

Hm, --reset-database doesn’t work, on NAS. I stopped syncthing and executed

./sycthing --reset-database

and syncthing silently exited. I hoped it did its work, but evidently it didn’t. According to Effect of parameter | -reset-database // -reset-deltas, this command should remove the folder /var/packages/syncthing/target/var/index-v0.14.0.db/, but it did not :-(. Can I remove the folder manually?

When I executed

./syncthing --reset-deltas

syncthing started and - according to its log - it performed what it was expected to do.

Is the same problem for all Synology admins. Different threads have as result the same. E.g.

At the end it was for me also the best to stop Syncthing, delete the content of the folder index-v0.14.0.db and start Syncthing again. This I make with all devices, it means Synologys, Windows, so it was clean. Since this point all is running without problems.

Also one productive NAS with Kastelo installation and update from v1.3.4 to now v1.4.0 works without any problems. The migration was without faults.

After deleting the index folder content, the problem hasn’t resolved. In fact, the situation is now even worse.

  • Most of the (receive-only) folders that were originally up-to-date now signal local-additions (with size 0B, i.e. probably deleted files, though I do not remeber deleting them).
  • The (send-receive) folders that were out-of-sync are still out-of-sync, though with substantially less out-of-sync-items.
  • These items moved (probably) to the corresponding devices, which are now stuck syncing and have plenty of out-of-sync items.

I’m beginning to panic :-(.

You are seemingly doing random things. I don’t think anyone advised you to reset the database, and you seemingly started inventing your own remedy, which lead you to this.

Are you connected to the remote(s) and has all the activity (scanning syncing) stopped?

Check if they are actually deleted and/or if they differ from the remote.

And please post screenshots again.

@AudriusButkevicius No. In other theads they advise to perform --reset-database which usually resolves all problems. As this command didn’t do anything in my instalation, I did that manually. I was consulting that with @imsodin and @Andy, and they didn’t advise me not to do that. So no random things.

Plenty people struggle - see the forum - with situations when Syncthing gets out-of-sync. In my opinion, there’s missing a comprehensive help that would instruct users what to do when this problem occurs for them. Out-of-sync may occur at various places - at sender or receiver, in folder or device. And all these variants ahould be handled in the help.

True, it’s definitely too omnipresent at the moment. However I did actually ask you whether you did reset the db and when - I did not tell you to do it now. I do however get how you got the impression that it is a good idea to do it now. And it’s not that bad, we can take it from here too.

There’s no comprehensive help other than (which has a lot of useful, but admittedly also some missing/outdated info), because it shouldn’t occur. What we are doing here is debugging a problem, that should lead to finding the bug and fixing it, such that you and everyone else don’t encounter it anymore.

So right now please post the requested information and we will try to figure out what’s going on.

The remote devices connect to NAS every several minutes, they are not connected permanently. While I was deleting the index, Syncthing was stopped, then I started it again, and it automatically started scanning everything. And remote devices started to connect.

The locally changed items do not exist at NAS. Syncthing reports size 0B for some of them, for others it reports its actual size before deleting. These files are not present at the remote device.

For the out-of-sync items I cannot say, as Syncthing doesn’t display the list. But as it displays the total size 0B, I think they are also the deleted files.


The 0 bytes ones are placeholders like .nomedia, they really are 0 bytes. And many of them are hidden files (starting with a dot) - did you check for that? If in doubt post the output of ls -la from one of the paths (e.g. just Helium).

There’s any way something wrong with the out of sync files not being displayed, no idea what from the top of my head. To get an understanding of the actual sync situation, please also post screenshots of the folder from the remote.

In my post at 12:11, in the third point, I said that - after index reset - some of the out-of-thing items moved from the out-of-sync folder to the corresponding device. Actually, these are the files that have been deleted from the remote device (the phone) but remained at NAS. After index reset, NAS wants to synchronize these files back to the phone, but this sync fails due to some problems at the phone side (“Your android version only grants Syncthing readonly access to the folder”, which prevents me to change the folder type to send-receive). Hence, the out-of-sync of this device is an expected behaviour. The phone shows exactly the same number and size of unsynchronized items as NAS.

I have to find a way how to allow write-access for Syncthing in the phone, but I think this is not related to the problems above. (The Android app is given Read/Write access to external storage, but still reports insufficient privileges.)

That doesn’t help, this is a known limitation of android. However I believe your android is set to send-only, so you can press the override button there to force it’s state on the NAS (that will make the NAS identical to the phone, i.e. also delete anything the NAS has but the phone does not).