Re: Can unison better help with renamed hosts?

Greg Troxel <[email protected]> Mon, 22 Apr 2024 17:51:55 -0400
Newsgroups gmane.network.unison.general
Message-ID <[email protected]>
"Dale R. Worley" <[email protected]> writes:

> I haven't used Unison in a number of years, but my memory is that the
> old host name can be found by looking at the first few lines of the ar*
> file (as gdt says).  I have a vague memory that Unison tells you what
> host names it is using when it starts a run.
>
> I do remember a gripe about this, though:  There's no clean way to
> *rename* a Unison archive to account for a host name change.  You want
> to be able to say "take the archive that syncs OLDFOO and OLDBAR, rename
> the ar* files properly to sync NEWFOO and NEWBAR, and rewrite the first
> lines of the ar* files to match".  Otherwise, a one-time host rename can
> leave you using rootalias forever.

Sure there's a clean way!  Write a program that takes the 4 args, and
finds and reads ar and fp, computes the new names, and writes those
files, and then after fsyncing them, removes the old ones.   But indeed,
there's no easily doable way...

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].