/usr/share/doc/monotone/html/Other-Transports.html is in monotone-doc 1.1-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>monotone documentation: Other Transports</title>
<meta name="description" content="monotone documentation: Other Transports">
<meta name="keywords" content="monotone documentation: Other Transports">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="General-Index.html#General-Index" rel="index" title="General Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Advanced-Uses.html#Advanced-Uses" rel="up" title="Advanced Uses">
<link href="Selectors.html#Selectors" rel="next" title="Selectors">
<link href="Advanced-Uses.html#Advanced-Uses" rel="prev" title="Advanced Uses">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="texinfo.css">
</head>
<body lang="en">
<a name="Other-Transports"></a>
<div class="header">
<p>
Next: <a href="Selectors.html#Selectors" accesskey="n" rel="next">Selectors</a>, Previous: <a href="Advanced-Uses.html#Advanced-Uses" accesskey="p" rel="prev">Advanced Uses</a>, Up: <a href="Advanced-Uses.html#Advanced-Uses" accesskey="u" rel="up">Advanced Uses</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="General-Index.html#General-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Other-Transports-1"></a>
<h3 class="section">3.1 Other Transports</h3>
<p>Monotone’s database synchronization system is based on a protocol
called netsync. By default, monotone transports this protocol over a
plain TCP connection, but this is not the only transport monotone can
use. It can also transport netsync through SSH, or any program which
can provide a full-duplex connection over <code>stdio</code>.
</p>
<p>When a monotone client initiates a push, pull, or sync operation, it
parses the first command-line argument as a URI and calls a Lua hook
to convert that URI into a <em>connection command</em>. If the Lua hook
returns a connection command, monotone spawns the command locally and
speaks netsync over a pipe connected to the command’s standard I/O
handles.
</p>
<p>If the Lua hook does not return a connection command, monotone
attempts to parse the command-line argument as a TCP address – a
hostname with an optional port number – connects a TCP socket the
host and port, and speaks netsync over the socket.
</p>
<p>By default, monotone understands two URI schemes:
</p>
<ol>
<li> SSH URIs, of the form
<code>ssh://[<var>user</var>@]<var>hostname</var>[:<var>port</var>]/<var>path/to/db.mtn</var></code>,
to synchronize between private databases on hosts accessible only
through SSH. (These paths are absolute; to refer to a path relative
to a home directory, use
<code>ssh://<var>host-part</var>/~/<var>relative/path.mtn</var></code> or
<code>ssh://<var>host-part</var>/~<var>user</var>/<var>relative/path.mtn</var></code>.)
</li><li> File URIs, of the form
<code>file:<var>/path/to/db.mtn</var></code>, to synchronize between local databases.
</li></ol>
<p><code>ssh:</code> and <code>file:</code> are currently not supported on the native
Win32 platform; they are supported on Cygwin and all other platforms.
</p>
<p>In the case of SSH URIs, the <code>ssh</code> program must be in your
command execution path, either <var>$PATH</var> on Unix-like systems or
<var>%PATH%</var> on Windows systems. Monotone will execute <code>ssh</code>
as a subprocess, running <code>mtn serve</code> on the other end of the
SSH connection. You will need <code>mtn</code> to be in the command
execution path of the remote shell environment.
</p>
<p>In the case of File URIs, <code>mtn</code> is run locally, so must be
in your command execution path.
</p>
<p>In both cases, the database specified in the URI needs to exist already,
and will be locked for the duration of the synchronization
operation. Therefore, it must also be writable, even when monotone isn’t
going to modify it, as it is the case for <code>pull</code>. Also note
that monotone’s default transport authentication is <em>disabled</em> over
these transports, to reduce the complexity of configuration and
eliminate redundant protocol cost.
</p>
<p>Additional URI schemes can be supported by customization of the Lua
hooks <code>get_netsync_connect_command</code> and
<code>use_transport_auth</code>. For details on these hooks, see
<a href="Netsync-Transport-Hooks.html#Netsync-Transport-Hooks">Netsync Transport Hooks</a>.
</p>
<hr>
<div class="header">
<p>
Next: <a href="Selectors.html#Selectors" accesskey="n" rel="next">Selectors</a>, Previous: <a href="Advanced-Uses.html#Advanced-Uses" accesskey="p" rel="prev">Advanced Uses</a>, Up: <a href="Advanced-Uses.html#Advanced-Uses" accesskey="u" rel="up">Advanced Uses</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="General-Index.html#General-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|