How Syncing and Deleting Works? What should I do different?

Hi All…

I have snycthing on my Synology Diskstation, alsways on and i have a PC and a RASPI sometimes online so it can sync to them. Only one folder is send and receive all other folders are only send from my diskstation.

I want to sort and move files, at the Send and Receive folder.

In my PC, recieve only folder, I very often get an error like this:

why does it not just exactly copy my diskstation to the PC ?

As for send and recieve folders: HOW does syncthing know, if a file is deleted at B and it should also delete it at A instead of reSyncing it again to B ?

And what should i do with my error :wink:

I guess you are affected by https://github.com/syncthing/syncthing/issues/6646 (which is fixed on master): If true, you have changed files in that directory on the receive-only end, and thus it can’t delete that directory (as that would undo your local change).

About the “filename is invalid”: You can’t do anything on the windows side. The other side created a file, that is not valid on windows, therefore Syncthing can’t create it. You need to rename it on the other device.

2 Likes

thank you!

lets delete this thread then, its some kind of solved :wink:

You’re welcome. No need to delete anything, if it helped you it might help someone else.

1 Like

As for send and recieve folders: HOW does syncthing know, if a file is deleted at B and it should also delete it at A instead of reSyncing it again to B ?

It always propagates the newest change. There’s an internal counting/version mechanism that determines which was first, or if two changes happened at the same time (then there’s a conflict). So if in the beginning both A and B have directory D, then B deletes D, that deletion is newer than the previous state and thus A deletes D too. If at the same time A created a new file in D, e.g. D/F, then both changes happened at the same time and A will not delete D (and B will resync D, as a deletion always looses a conflict).

1 Like

ok, thanks! sounds good and safe also :wink:

OKAY, me again, sorry…

i do sort, rename, delete, files and folders at my “seeding” drive…

the result on my receiving side is: image

it is just not doing it…

do i only need to wait very long? it does not show sync progress (nothing is downloaded)

some files are not deleted and they are local changes now… :-/

What are the failed items?

Also given a synology is involved, did you check the ignore permission option there is set?

the failed ones are gone now the ignore permissions is set… on synology side (the sender) and on windows side ( receiver)

All the out-of-sync items still remain? There shouldn’t be out-of-sync items without failed items when the folder is not in the process of syncing. Anything in the log?

The local changes say “0B”, probably because they are deleted. This means from Syncthings point of view those files are locally deleted, but not on the remote. However you are saying they are deleted everywhere? Could you get the output of querying https://docs.syncthing.net/rest/db-file-get.html for one of these files please.

it is still looking like this:

logfile is attached syncthing log 200615.txt (189.3 KB)

i get back with the query output, when i know how :wink:

For windows: [ How To ] call the REST API from Windows PowerShell

For curl (anywhere else probably): https://docs.syncthing.net/dev/rest.html#api-key

1 Like

okay, since the receiving side is windows, i followed your windows link/steps, here is the output: response.xml (10.1 KB)

( Don’t know/understand if i should do it with another path or file, which one then )

sorry for being linux noob :-/

all renames or deletes are still not done after a week at thr receivers side

That’s the output of the config endpoint, not /rest/db/file. Your URL needs to look something like 'http://localhost:8384/rest/db/file?folder=792we-gdmch&file=_Gamez/...'. On linux it’s much simpler than windows, just open a command line and enter curl -X GET -H "X-API-Key: *yourapikey*" 'http://localhost:8384/rest/db/file&folder=...' (inserting the appropriate values).

1 Like

Also, as the log file shows Syncthing is panicking (crashing) it may help if you could find the panic files and upload one. They’ll be in the same folder as the log.

1 Like

Ah didn’t look at the log at all yet, thanks for the hint. As it happens while pulling, the panic is likely to be https://github.com/syncthing/syncthing/issues/6654, which is fixed in v1.7.0-rc.1. The panic file @ProactiveServices asked for would show if that’s the case.

1 Like

wow, thanx for your noob-patience!

ok. here is the query of one of those 0B Locally Changed Items : response2.xml (1.0 KB)

what i did on the sender side was only: delete Folders or I renamed them from (for example) _Gamez\FULL.Civilization III
to _Gamez\Civilization III

thank you! :-*

here are some logs, that ProactiveServices talked about: Syncthing Logs.zip (1.8 MB)

The panic is due to a bug in 1.6.1 I think, so you can upgrade to the latest RC, but the logs clearly state that you are out of disk space…