bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.01k stars 227 forks source link

Add ability to save parity files #870

Closed vogu66 closed 1 year ago

vogu66 commented 1 year ago

Hello,

I've been using Unison for backups and I came across a case that Unison could probably handle and would be interesting, and that I believe is not already implemented.

Parchive is a tool that lets one create parity files that can be used to check for bit-rot and repair files. However, it may be quite annoying to use in batches when a few of the original files change, causing specific parity files to be out of date. Considering Unison tracks the files that changed, I believe it would be interesting to have options to generate (via parchive as an optional dependency), store and verify files directly from Unison. E.g. to make a backup you would use something like:

unison -source_parity='/source/parity/path' -destination_parity='/destination/parity/path' /source/path /destination/path

And Unison would eliminate and re-generate the parity files that are not up to date anymore.

Then, Unison could also be used to check the parity files of the files that didn't change yet, to verify the integrity of the backup (which I assume wouldn't happen every single backup because it takes time and the whole point is to not take too long to backup).

Cheers, Vogu66

gdt commented 1 year ago

I see this as pretty far beyond the scope of unison, and there is no one just working on requested features. If you want to work on this yourself, please feel free to start a discussion on the unison-hackers list, where we could talk about the various approaches to meet this goal -- I see it as more complicated and unclear that unison is the right place architecturally.