Skip to content

Commit 27fcb7f

Browse files
committed
deploy: c82fca0
1 parent 56a1fff commit 27fcb7f

4 files changed

Lines changed: 52 additions & 2 deletions

File tree

print.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,31 @@ <h2 id="commands-2"><a class="header" href="#commands-2">Commands</a></h2>
840840
<p>One endpoint is always the local machine. Sync targets resolve the project and
841841
machine from the existing registries, so adding <code>--proxy-jump</code>/<code>--forward-agent</code>
842842
to the machine automatically applies to its sync targets too.</p>
843+
<h2 id="syncing-a-project-between-hosts"><a class="header" href="#syncing-a-project-between-hosts">Syncing a project between hosts</a></h2>
844+
<p>The commands above are a registry of named targets you set up once and run again. This is the other
845+
half: an ad-hoc copy between two machines, named the way everything else names projects.</p>
846+
<pre><code class="language-sh">wing sync project api tron # this project, onto that machine
847+
wing sync project lab:api local # bring it back
848+
wing sync project lab:api tron:api # between two machines
849+
wing sync project api tron --to /srv/api # a different path on the far side
850+
wing sync project api tron --delete --exclude target --exclude .direnv
851+
wing sync project api tron --dry-run # print the plan, touch nothing
852+
wing sync project api tron --register # …and record it as a project on tron
853+
</code></pre>
854+
<p><code>SOURCE</code> is a registered project (<code>name</code>, or <code>host:name</code> when the bare name is ambiguous).
855+
<code>DEST</code> is a machine, or a project on one. A machine on its own means <em>the same project, over there</em>,
856+
which saves registering it before the first copy.</p>
857+
<p><strong>Where it lands</strong>, in order: <code>--to</code> if given; else the path the destination's own registry entry
858+
has; else the source's path, which keeps a project in the same place on every machine.</p>
859+
<p><strong>When neither end is this machine</strong>, the bytes are relayed through here — down, then up. That is
860+
twice the transfer and still the right default: rsync cannot talk between two remote hosts on its
861+
own, and the alternative needs the source to be able to ssh to the destination, which usually is not
862+
set up and fails confusingly when it is not.</p>
863+
<pre><code class="language-sh">wing sync project lab:api tron --direct # run rsync on lab instead
864+
</code></pre>
865+
<p><code>--direct</code> is for when it is set up: rsync runs on the source machine and connects onward itself.</p>
866+
<p><code>--register</code> records the copy, so <code>wing hosts</code> and <code>wing project list</code> show the project on both
867+
machines afterwards — which is the point of a host being part of a project's identity.</p>
843868
<div style="break-before: page; page-break-before: always;"></div><h1 id="tui"><a class="header" href="#tui">TUI</a></h1>
844869
<p>The TUI provides a terminal dashboard over the same command/storage logic used
845870
by the CLI.</p>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

searchindex.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sync.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,31 @@ <h2 id="commands"><a class="header" href="#commands">Commands</a></h2>
202202
<p>One endpoint is always the local machine. Sync targets resolve the project and
203203
machine from the existing registries, so adding <code>--proxy-jump</code>/<code>--forward-agent</code>
204204
to the machine automatically applies to its sync targets too.</p>
205+
<h2 id="syncing-a-project-between-hosts"><a class="header" href="#syncing-a-project-between-hosts">Syncing a project between hosts</a></h2>
206+
<p>The commands above are a registry of named targets you set up once and run again. This is the other
207+
half: an ad-hoc copy between two machines, named the way everything else names projects.</p>
208+
<pre><code class="language-sh">wing sync project api tron # this project, onto that machine
209+
wing sync project lab:api local # bring it back
210+
wing sync project lab:api tron:api # between two machines
211+
wing sync project api tron --to /srv/api # a different path on the far side
212+
wing sync project api tron --delete --exclude target --exclude .direnv
213+
wing sync project api tron --dry-run # print the plan, touch nothing
214+
wing sync project api tron --register # …and record it as a project on tron
215+
</code></pre>
216+
<p><code>SOURCE</code> is a registered project (<code>name</code>, or <code>host:name</code> when the bare name is ambiguous).
217+
<code>DEST</code> is a machine, or a project on one. A machine on its own means <em>the same project, over there</em>,
218+
which saves registering it before the first copy.</p>
219+
<p><strong>Where it lands</strong>, in order: <code>--to</code> if given; else the path the destination's own registry entry
220+
has; else the source's path, which keeps a project in the same place on every machine.</p>
221+
<p><strong>When neither end is this machine</strong>, the bytes are relayed through here — down, then up. That is
222+
twice the transfer and still the right default: rsync cannot talk between two remote hosts on its
223+
own, and the alternative needs the source to be able to ssh to the destination, which usually is not
224+
set up and fails confusingly when it is not.</p>
225+
<pre><code class="language-sh">wing sync project lab:api tron --direct # run rsync on lab instead
226+
</code></pre>
227+
<p><code>--direct</code> is for when it is set up: rsync runs on the source machine and connects onward itself.</p>
228+
<p><code>--register</code> records the copy, so <code>wing hosts</code> and <code>wing project list</code> show the project on both
229+
machines afterwards — which is the point of a host being part of a project's identity.</p>
205230

206231
</main>
207232

0 commit comments

Comments
 (0)