Revert Local **METADATA** Changes

We have a case where we get receive only folders out of sync because of manual changes which perhaps shouldn’t really happen but do happen for good reason. Sometimes changes are metadata only, and sometimes files are changed.

Is it a crazy idea to have TWO buttons, one that says “Revert Local Changes” like we have today and an additional button that says “Revert Metadata Changes” that only reverts files that are hash identical (same contents) but differ in metadata only? This could theoretically be possible on Send Only folders as well as Receive only folders.

In my case I would have no problem clicking “revert metadata changes” and even scripting it. But if there are real file contents changes, then we have to do a diff between what’s on the sending side and what’s on the receiving side, which actually isn’t that easy to do. (we have to copy over everything via another method and do a local diff.)

Thoughts?

In my case I use Syncthing to keep a photo database (Digikam) that is changed only at a single computer (set to Send-only) and sync’ed to a bunch of other computers (all set to Receive-only). I use this technique frequently to keep other kinds of data at a “master” site which is the only place I change it, and automatically sync to a bunch of “slave” sites which should always be kept in sync with the master.

The problem with “out of sync” occurs because the programs using the data at the slave sites often make some kind of change to the data, such as a “when last used” or similar entry. It’s not really “metadata” since the files have actually been changed. So sync’ing often results in out-of-sync errors and sometimes large extraneous files containing the conflicts.

My preference would be for two options at each “consumer” computer. One option (Receive-only) would work as it does today, and flag any conflicts as potential problems. The new second option (“Receive-Overwrite”?) would also be to receive only, but ignore any conflicts detected. This second option would remove lots of “Out of sync” warnings, avoid the need to do “revert” actions at all, and avoid problems such as running out of storage because of the conflict files that otherwise get created.

Or maybe I’m still missing something and there’s some other way to do this…

Use file permissions to prevent the applications from touching the files, if you really want them to be “receive only”.

I haven’t tried that, but I suspect the applications may not be happy if they can’t write anything into the files. It’s OK with me that the apps change the files; that’s part of how they work. I suspect they store various things in the file, like a history of search terms used, logs of activity, etc. The goal is that whenever changes occur (infrequently) in the master (like adding new photos), those changes propagate out to all of the slaves. Understandably that means that all of the data that the slaves changed will be lost, but that’s OK. It just requires the discipline to make additions or changes only on the master if I want them to be permanent.

I’ve also tried using files stored on my NAS. But apps usually aren’t designed for that environment with multiple computers using the same files. Without the apps doing any kind of locking, that means you have to be very careful about simultaneous use. Using a NAS also slows performance a lot, even with a fast LAN.

Another option is using a real database shared by all computers over the LAN, assuming the app involved supports such an option (Digikam does). I’m pretty sure that would work (I worked in Development at Oracle for 8 years) and avoid the need for syncthing entirely. But it would also incur a similar performance penalty, make the system more complex, and preclude using any computer (such as a laptop) unless it’s on my LAN at the time, or I “open up” my LAN to the Internet, which seems like a bad idea.

So I prefer a syncthing approach, but would like to get rid of the out-of-sync warnings.

/Jack Haverty

I think it’s pretty easy to (*edit) automate “revert local changes”

What you’re asking for is different from the original request.

The original post is about reverting metadata changes so we can do that and see what conflicts remain because of file content changes.

I’m not sure what you mean by “sync revert local changes”. Is there some way to do that now? – perhaps in the Advanced menu that I’ve not had the courage to fool around with. It would be nice to have “revert” done automatically for specific folders.

In my setup, I mostly ignore metadata. With my chaotic environment of Windows, Macs, Linux, Android, and IOS, metadata isn’t particularly useful. So I mostly just hit the “Revert Local Changes” button on any machine when a receive-only folder is involved.

But I can see the need for the two functions - revert (all) local changes and revert only metadata changes.

There’s another question here of how to present the options to the human user. Two buttons is one way to do so. Another way is the receive-only and receive-overwrite settings on individual folders - effectively if only to avoid the need to click the buttons for every folder. A third way is to use some icons to flag the files listed in the out-of-sync logs, indicating which have changes in content and which have just changes in metadata.

I can envision use cases where all three of these GUI features would be helpful.

Sorry I used the wrong word and edited my previous comment.