Remembering already received files on receive-only side

Hi there. When setting up a folder as “receive only” on a node, is it possible to have it remember files that have previously been received, in case I delete them locally? Currently, they get re-synced over and over again.

Here’s what I’m trying to achieve, for the bigger picture. Maybe there even is other software better suited that I just haven’t found: I want to archive photos from two Android phones for non-techy people. Specifically the idea is that photos and videos taken get sent over to a receiving machine almost immediately where they can then be sorted into folders by date or topic, maybe even automatically moved by some other software. Further backups could be taken of that sorted folder structure by making it another Syncthing folder in send-mode, or some entirely different software. Apart from some minor usability issues with the Android app (again, for older, non-tech people), this works really well. Syncthing is almost instant and works across the the globe. I haven’t found anything else that works that well on a technical level.

The only thing really is the delete issue that immediately resyncs a file. Can this be changed, or is anything planned in that direction?

Syncthing purpose is to make two folders look the same on two different machines, not to transfer files from A to B like rsync would.

How do the “Send only” and “Receive only” options come into play for this goal?

it seems “receive only” is a shortcut for “keep files in sync with a remote and discard any local changes, if any”.

IMO that directly contradicts to “make two folders look the same on two different machines”, as they won’t be anymore if you start adding files on the receive only side, for example. I guess these options made me assume Syncthing was designed to be more versatile than it actually is. Which is unfortunate, since I didn’t discover anything else with a robust technical foundation yet.

It seems you more need a tool to do “remote folder momentary snapshot”, rather than “keep always my local and remote folders in sync”

If you search the forum for “one way sync”, you will find at least a few workarounds (aka hacks) to force Syncthing work the way you want. The purpose of Receive Only folders, however, is only to ensure that no local changes will be pushed elsewhere.

The whole idea is that you do not add any files on the Receive Only side :wink:, at least not on purpose. If some other software messes with the files, or you get a virus infection or something, then the Receive Only folder will at least not push those changes to remote devices.

I don’t exactly understand what your requirements are: Should the file on the android devices remain as they are, i.e. Syncthing should change anything there? And on the server you want to do the reorganisations/backups/… you described?
If yes, then that sounds like send-only on android to protect from accidental changes, and on the receiving side use a backup solution to backup the synced folder, and do reorganisations outside of the synced folder. Then you can use Syncthing for the transport (sync), while doing all the rest with dedicated software (Syncthing/any syncing (!) solution is not backup).

1 Like

Thanks, I took some inspiration from these.

Yes, kinda. To elaborate a bit further, my goal is to set up a small NAS/server with syncthing as the receiving device. The phones should sync their photos over as soon as possible, e.g. on a vacation, so in cases your phone drops in the ocean or gets stolen, you don’t lose all your photos taken on the trip.

Now eventually, the phone will run out of space so you start deleting old photos, which leads to the first problem: You don’t want them deleted on the receiving side. I found the “ignore deletes” setting, but also recommendations to not use it as it might cause problems. But even if I enabled that, I’d just have a huge folder on the receiving device that will eventually have a bazillion files in it without any structure. So on the receiving device/NAS, I’d like to periodically organize all the photos from the receiving folder into another directory structure, where I can create sub-directories for events, trips, etc.
But as soon as I move a file out of the receive only folder, it obviously gets re-synced from the phone as long as it’s not deleted on there too.
So here my first idea was to have a “receive only and remember locally deleted files as if they were still there” mode in Syncthing.

But now after reading some of the tricks others have used, I think I’d set up something that scans the receiving folder on the NAS every X minutes, looks for new files, then copies them over to another folder called “TODO”, so you later know that these are photos you haven’t sorted into the final directory structure yet. So I’d basically just write a simple tool that remembers every file it already copied to the TODO-folder forever and skips those on future runs. This way I don’t need to use the “ignore deletes” setting and only ever waste as much space on the receiving side as the phone has internal storage (Since all the photos need to remain in the receive-only Syncthing folder on the NAS, until the final “real” delete gets synced over from the actual phone when you clean up there). Not ideal with two 128GB phones, but at least doesn’t require any modifications to Syncthing. :slight_smile:

Then finally, a weekly backup of the organized directory structure + TODO-folder to somewhere else can happen.

Thanks for all the input.

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