Re: mountpoint parameter
Greg Troxel <[email protected]> Thu, 25 Sep 2025 12:34:42 -0400
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <[email protected]> |
Micha Silver <[email protected]> writes: > Thanks Greg: > > On Thursday, 25 September 2025 at 18:51, Greg Troxel <[email protected]> wrote: > >> I just reread, and I see that the text is confusing. But I'd like to >> hear how you interpret the manual and the man page. > > In the docs the mountpoint parameter is described as a path. > "-mountpoint PATH causes Unison to double-check, at the end > of update detection, that PATH exists and abort if it does not" > > So following that I had tried several combinations of possible > "paths". When I entered the full path to the actual mount point > "/media/micha/backup" then the error was that absolute paths are not > supported. *Any* other string tried to append that string to the first > root and the backup aborted since there is no > "/home/micha/micha/backup", etc. > > What I expected was checking only the path of the externally mounted > file system. Or alternatively, allowing for separate "mountpoints" for > each root. (In general you would not expect the path of one root to > exactly match the path at the second root.) The manual says: \SUBSECTION{Mount Points and Removable Media}{mountpoints} Using Unison removable media such as USB drives can be dangerous unless you are careful. If you synchronize a directory that is stored on removable media when the media is not present, it will look to Unison as though the whole directory has been deleted, and it will proceed to delete the directory from the other replica---probably not what you want! To prevent accidents, Unison provides a preference called \verb|mountpoint|. Including a line like \begin{verbatim} mountpoint = foo \end{verbatim} in your preference file will cause Unison to check, after it finishes detecting updates, that something actually exists at the path \verb|foo| on both replicas; if it does not, the Unison run will abort. I interpret this as saying that foo should be a pathname within the replica, so that unison can error out if the replica isn't actually there. Thus a reasonable value might be ".emacs" (if you're of that tribe), but really some file that is in your home directory, and thus will be missing if the removable media is not mounted. The man page mountpoint xxx Including the preference -mountpoint PATH causes Unison to double-check, at the end of update detection, that PATH exists and abort if it does not. This is useful when Unison is used to synchronize removable media. This preference can be given more than once. See Section “Mount Points and Removable Media” in the manual. is less clear, but it says that one should read the manual :-) The error Fatal error: Path /home/micha/micha is designated as a mountpoint, but points to nothing on host RMS is also confusing, unless one has just read the manual in the last few minutes. There is also confirmbigdel, but the man page notes that this is only for TUI. (I wonder if that's still true.) To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].