Re: Archive files gone?
Greg Troxel <[email protected]> Sat, 11 Oct 2025 07:04:18 -0400
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <[email protected]> |
"Head Geek (=E4=BC=9F=E6=80=9D=E7=A4=BC)" <[email protected]> writes: > Got this today: >> Warning: No archive files were found for these roots, whose canonical na= mes are: >> /Library/WebServer/Documents/UG >> /Volumes/GF1500/UG >> This can happen either >> because this is the first time you have synchronized these roots, or be= cause you have upgraded Unison to a new version with a different >> archive format. =20 You left out the command line that reproduces this with the roots. > It's far from the first time=E2=80=94been doing it one to three times a w= eek since March. > And =E2=80=A6/unison/2.53.7 was installed before that and not modified si= nce. > Nor have I deleted anything in ~/.unison > > The message goes on to suggest a DHCP issue, but DHCP cannot change my > local hostname, and both roots are local. I downloaded the PDF > manual, but the discussion of UNISONLOCALHOSTNAME is not helpful. Am > I supposed to set it to the output of `hostname`? When doing network sync, unison determines the name of the host (exactly how matters, not paged into my head this minute, and the code is there to read). If UNISONLOCALHOSTNAME is set, that value is used instead. $ egrep -R UNISONLOCALHOSTNAME . which leads quickly to os.ml and let localCanonicalHostName =3D try System.getenv "UNISONLOCALHOSTNAME" with Not_found -> Unix.gethostname() As an example, I had a computer in one place foo.example.com. I used unison to backup bits to it. I moved it to a different place, and I changed the name to bar.example.com; that made sense for reasons other than unison. sync to this machine was looking for archives under foo, but I wanted to keep suing them. So I have UNISONLOCALHOSTNAME=3Dfoo.example.com in .ssh/environment and that with export in shell environment. > I did take the laptop out of the house today and connect it to the > WiFi at the hospital, but that can't change the hostname and I did not > run unison while there. Even if the hospital could have changed my > defined hostname (it CAN'T), the above messages happened after I > returned home and got back on my own LAN. As for "DHCP cannot change local hostname", that depends on what local hostname means. DHCP certainly sends a domain. I would suggest running 'hostname', and reading the sources for that to make sure it is just calling gethostname(3). I would also suggest looking at the archive files in .unison. "head -3 *" will give you a good sense of what's going on. (Do not print line 4; there be (binary) dragons.) The hostname is used even for local/local syncs. I suspect that you will find that your hostname is changing. Can you explain what was unclear about the manual: The function that finds the canonical hostname of the local host (which is used, for example, in calculating the name of the archive file used to remember which files have been synchronized) normally uses the \verb|gethostname| operating system call. However, if the environment variable \verb|UNISONLOCALHOSTNAME| is set, its value will be used instead. This makes it easier to use Unison in situations where a machine's name changes frequently (e.g., because it is a laptop and gets moved around a lot). To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected].