bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.19k stars 235 forks source link

unison-gui: make '-times' default or add a gui option #1073

Closed Romano44 closed 3 weeks ago

Romano44 commented 4 weeks ago

Comparing files only by their size is too unreliable because they can still be binary different. While using checksum is the safest bet, it is a problem with multi TB size data due to time wasted scanning every byte. Size+mtime comparison is the most reasonable(and in other software most common) way to get task done - especially with random or first time scans. It is therefore crucial that mtime is also copied with file transfer to then be later used as an additional variable during comparison.

Unison[-gui] already provide -times switch, which is great and I use it. But this really should be default behavior or it should be in the gui as an option. Having to use command switches for gui is, say less than stellar. Especially when distro package maintainer decide not to use it and user is required to modify .desktop launch file manually - possibly each time new version overwrite it.

Please make -times switch a default for gui, or make a gui option to toggle it.

acolomb commented 4 weeks ago

You should use the "Profiles" feature in the GUI, where you can configure this option (and others) persistently. No need to use command line switches for the GUI in that case.

gdt commented 4 weeks ago

I am not going to change a default for the GUI while not changing it for the TUI. Changing to -times as default is not out of the question, but it would need a solid plan to avoid problems when it changes.

I'll leave this open briefly, but to keep it I'll need an explanation of all of:

Romano44 commented 4 weeks ago

@gdt, gui wizard for Profile Creation do not give me option to add parameters. Also, editing it later seems extremely unintuitive, confusing and just badly designed IMO. In fact this whole "profile creation" necessity is irritating extra work.

I just want 2 paths to sync, with simple size+mtime thats all. So to your first point, the very fact that profile is required as mandatory in gui(while not in console) is already problem, not that it is insufficient.

Your second point is a problem too. I need size+mtime like most other software. Because I will also need it for TB's of data backups later. I don't have time to waste waiting for a 12+TB scan and don't like idea of app keeping its sync data that would require rescan if I lose it.

To your third point, there should not be need for a profile creation in the first place. After all, console mode do not require it. Point of a gui in the first place is to have a simple access and menus/buttons for toggling obvious, frequently used things in place. That command line is faster due to not needing a "profile" only shows gui's obstructive design.

I will tell you my experience, hopefully you will get something from it: I want simple, accessible, fast app to sync 2 paths. To mirror backup disks etc. Point is to mirror dir1 to dir2 exactly, using fast but reasonably safe algos(hence size+mtime together). So that after sync, I have exact file/dir structure on dir2.

acolomb commented 3 weeks ago

You should be aware that Unison works very differently from the other mentioned solutions. Even if you just specify paths on the command line, it builds a kind of database, called the "archives", which remembers the state of each file during the synchronization. Next time you run it on the same paths, the changes relative to this stored state are compared for each side, not only the difference between the actual files on disk. It's designed to be run on the same set of paths repeatedly, that's where Unison has its strengths.

Considering this use case, it's absolutely appropriate to create "profiles" as well, so the synchronization between two roots happens with the same settings each time. That's the solution built into Unison, and that's what the GUI exposes because usually one doesn't want to check all settings are at the right values again, each time a pair of roots is re-synchronized.

One more thing about your request: Remember this is Open Source. It means you are free to use it for whatever and to study how it works or modify it. You are also free to express your opinion. But stating you found something that "works absolutely correctly" and then whining about it here because you "hate [the] GUI looks to death" is absolutely none of our business. If you have an improvement in mind for the FreeFileSync GUI, then go ahead and make it happen, by learning how to program and contribute, or finding someone you can hire for it. Same thing with Unison: If you want an improvement for the GUI, make a proposal and ideally a Pull Request with the required code changes. Chances are very slim that someone will start developing it for you based on this request.

But first, please try to understand Unison as it is, before comparing it with other solutions that work differently. In my opinion, it makes perfect sense to use profiles and I have actually never used Unison without them. They solve the problem you stated elegantly, so it's hard to see a need for implementing other ways just because you refuse to accept the solution.

gdt commented 3 weeks ago

I have opened #1074 about making times default, asking for discussions of the difficult parts on unison-hackers@.

Following the issue tracker guidelines, you are welcome to open a discussion on the mailinglist about features, but the point is to get them crisp enough to be implementable. However, that is likely only useful if you intend to implement them.

I'm going to close this as an answered question, which is that one should create a profile and use it. Followups on unison-users@ please as the issue tracker is only for bugs and well-analyzed and specified feature requests (that argue that the benefit is worth the complexity).