Re: Feature request: confirm data loss when renaming folder with ignored files
Dave Warren <[email protected]>
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <[email protected]> |
On 2023-07-12 05:59, Greg Troxel wrote: > Why are you declining to sync something that is important, while wanting > to sync the containing directory? I really am curious, because I find > that people are wanting to use ignore all the time, in ways that don't > make sense to me. There is a lot of room between "important enough to sync" and "just delete it randomly[1]" I think it's going to be common to keep configuration files synchronized, but not current-state, caches, and machine-specific data, and after shuffling stuff around on one computer I don't necessarily want to lose the local state elsewhere. Browser partially downloaded .part files are another example, you don't want to try synchronizing them at all, but nor do I want them deleted if I delete all empty subdirectories from another machine. I synchronize Thunderbird's configuration, but not the ImapMail or indexes as that gets rebuilt on the fly. I don't really rename profiles that often so I'm not likely to actually lose data here, but it takes about an hour to rebuilt my ImapMail and related indexes from scratch. [1] I know it isn't random, but in practice, it bites when you aren't expecting it even if you fully understand the behaviour. > One approach might be to make removing a directory fail if it is > non-empty (with the files that are supposed to be recreated moved > first). This will turn your data loss scenario into an annoyance for > many, but that seems reasonable. It is reasonably likely that it is a > small change, basically rmdir instead of rm -rf, or just declining to > enumerate and clean up. It's also reasonaly likely that it will cause a > lot of complaints. I think this needs to be optional to cover all use-cases. I've lost data to the current implementation myself. My own fault, I understood what I was doing when I set it up. I'd be thrilled to have a per-profile switch, it doesn't need the complexity of per-path... Or at least, I already have multiple profiles that use the same pair of roots and do different things to different subsets of files for various reasons, it wouldn't be a big deal to me if I added one more with the sole task of deleting ignored directories where appropriate. I'd use this as an opt-in rather than opt-out. I also really rely on this feature to do some cleanup of customer-uploaded files and the unzipped version (in subdirectories), but I don't synchronize the subdirectories because I can just unzip again if needed. But once a ticket is done, I have 30 days to delete everything, so it is great to just nuke a ticket's root directory and have the rest vanish. Full disclosure, I don't actually use unison at work anymore, but I did in the past and it was perfect. I've been using it for like 15 years for personal and professional purposes, but $DAYJOB is complicated. -- To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].