Deleting file creates 2 copies with versioning enabled

I’m trying to do some basic setup of a folder synced between my Android phone and Synology NAS. I have the 2 devices linked and created a new sync folder from my phone, and I set both ends to “simple” versioning. When I delete a file on my phone, the folder on my Synology renames the file to “.trashed-filename” and also creates a copy that is moved to the versions folder I specified. Is there something I’m missing that is causing this behavior? This is making it take up twice as much space on my Synology, which will be problematic for a larger amount of files.

My goal is to have my phone’s photos directory synced to my Synology, and if I delete the files from my phone it will just move them out of the synced folder into a different directory, allowing for a psuedo-backup to my NAS while freeing up space on my phone.

The .trashed-whatever behavior is not Syncthing, that’s something else.

I think I figured it out, I believe it’s the way Android handles its own “trash” system. I tested it out by setting up a folder sync with no versioning at all, then I deleted a file, noticed it got renamed as “.trashed”, then went into my phone’s trash and deleted it from there, then the file went away entirely.

Yup, it’s a safety feature of Google Photos and Google Files that can’t be disabled.

You’ve got three options:

  • Pause Syncthing → delete photos → empty trash → unpause Syncthing.
  • Use a non-Google app when deleting photos (e.g. Material Files).
  • Use Syncthing’s ignoring files feature to exclude those trash files.

Since you’re syncing directly to a NAS, having the .stignore file on the NAS will cover all Android devices in case you end up adding more than just your phone. I use the following pattern in mine:

.trashed-*

Yeah I went the route of putting a “**/.trashed*” ignore statement in and it’s working fine now, thanks though.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.