bcpierce00 / unison

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

Tool for updating a renamed source directory, retaining cache #1056

Closed hirak99 closed 1 month ago

hirak99 commented 1 month ago

This is probably more like a question.

The issue is I have a large directory whose name / mount point is something I need to change frequently.

When I change it, the data remains, just the name changes. But it causes Unison to again scan everything in the directory and rebuild its cache, which is quite time consuming. Is there any way to tell Unison to move the cache from old directory name to the new one?

I am happy to tinker, so if there is a format reference and I have to manually write some code to update it, that is perfectly fine.

hirak99 commented 1 month ago

My hope is that may be it's just a matter of renaming the ~/.unison/arHASH and ~/.unison/fpHASH, after computing a new HASH for the renamed directory.

acolomb commented 1 month ago

You can use the rootalias preference to let unison think the new path is equivalent to the old path, and the archives will get reused. Check the manual for details.

gdt commented 1 month ago

Please use the mailinglist for questions and help request. The tracker is only for bug reports.

See

Please explain how you came to create an issue without reading the above wiki page Or if you did, how you didn't understand that questions are not allowed in the issue tracker.

gdt commented 1 month ago

If you want to work on code to improve things, the right place to discuss is unision-hackers@.