It would interest me how Syncthing treates the moving of files. Are the moved file also moved on the remote device? Or will the files be deleted in the old directory and re-uploaded to the new directory on the remote device
A move/rename should be handled as a rename on other devices as well. Technically what happens is that the update is sent as a pair of entries; one describing the new file, one saying that the other file has been deleted. We notice that the block checksums are identical and optimize it by “reusing” the file we were going to delete.
Moving files between folders (the Syncthing concept that has a label etc, not just directories on disk) is not optimized like this currently.
Well, but it potentially has a chance to copy the blocks across folders too, it all depends on the order of rescans of the two folders.
hi guys… In my example, syncthing deletes the files and uploads them again to my debian machine. I used drag&drop on my windows machine. should I use strgx&strgv? Could you clarify in which cases syncthing doensn’t simply move files? oO
In the cases when it sees the file removed before the new file added, which is very unlikely, or if it’s moving across folders, then it all depends on the order of rescans.
just had it with approx 370 files On my windows machine, I had a scan interval of 5 and on the debian machine 10. is maybe this “gap” responsible for this behaviour?
-bigfolder –lilfolder —music.mp3 was moved to: -bigfolder –music.mp3
Its not the scan interval between the machines, but between folders. Have you moved files in the same syncthing folder or across syncthing folders? (Not os folders)
I moved /bigfolder/lilfolder/music.mp3 to /bigfolder/music.mp3 bigfolder and all subfolders were synced while lilfolder is a subfolder of bigfolder…
So it’s within a single syncthing folder, correct? In that case files most likely got moved, it was just not obvious. They still show up in the out of sync list until the move happens. You can enable STTRACE=model and should see a bunch of taking rename shortcut log messages.