]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/public-inbox-clone.pod
9288b175a29abd1eea0e37957c75767d3b3ed85f
[public-inbox.git] / Documentation / public-inbox-clone.pod
1 =head1 NAME
2
3 public-inbox-clone - "git clone --mirror" wrapper
4
5 =head1 SYNOPSIS
6
7 public-inbox-clone INBOX_URL [INBOX_DIR]
8
9 public-inbox-clone ROOT_URL [DESTINATION]
10
11 =head1 DESCRIPTION
12
13 public-inbox-clone is a wrapper around C<git clone --mirror> for
14 making the initial clone of a remote HTTP(S) public-inbox.  It
15 allows cloning multi-epoch v2 inboxes with a single command and
16 zero configuration.
17
18 It does not run L<public-inbox-init(1)> nor
19 L<public-inbox-index(1)>.  Those commands must be run separately
20 if serving/searching the mirror is required.  As-is,
21 public-inbox-clone is suitable for creating a git-only backup.
22
23 public-inbox-clone creates a Makefile with handy targets to update the
24 inbox once indexed.  This Makefile may be edited by the user; it will
25 not be rewritten by L<public-inbox-fetch(1)> unless it is removed
26 completely.
27
28 public-inbox-clone does not use nor require any extra
29 configuration files (not even C<~/.public-inbox/config>).
30
31 L<public-inbox-fetch(1)> may be used to keep C<INBOX_DIR>
32 up-to-date.
33
34 For v2 inboxes, it will create a C<$INBOX_DIR/manifest.js.gz>
35 file to speed up subsequent L<public-inbox-fetch(1)>.
36
37 =head1 OPTIONS
38
39 =over
40
41 =item --epoch=RANGE
42
43 Restrict clones of L<public-inbox-v2-format(5)> inboxes to the
44 given range of epochs.  The range may be a single non-negative
45 integer or a (possibly open-ended) C<LOW..HIGH> range of
46 non-negative integers.  C<~> may be prefixed to either (or both)
47 integer values to represent the offset from the maximum possible
48 value.
49
50 For example, C<--epoch=~0> alone clones only the latest epoch,
51 C<--epoch=~2..> clones the three latest epochs.
52
53 Default: C<0..~0> or C<0..> or C<..~0>
54 (all epochs, all three examples are equivalent)
55
56 =item -I PATTERN
57
58 =item --include=PATTERN
59
60 When cloning a top-level with multiple inboxes, only clone inboxes and
61 repositories matching a given wildcard pattern (using C<*?> and C<[]> is
62 supported).
63
64 =item --exclude=PATTERN
65
66 When cloning a top-level with multiple inboxes, ignore inboxes and
67 repositories matching the given wildcard pattern.  Supports the same
68 wildcards as L</--include>
69
70 =item --inbox-config=always|v2|v1|never
71
72 Whether or not to retrieve the C<$INBOX/_/text/config/raw> HTTP(S)
73 endpoint when cloning.
74
75 Since we can't deduce v1 inboxes from code repositories, setting this
76 to C<v2> or C<never> can allow faster clones of code repositories if
77 no v1 inboxes are present.
78
79 Default: C<always>
80
81 =item --inbox-version=NUM
82
83 Force a remote public-inbox version (must be C<1> or C<2>).
84 This is auto-detected by default, and this option exists mainly
85 for testing.
86
87 =item --objstore=DIR
88
89 Enables space savings when the remote C<manifest.js.gz>
90 includes C<forkgroup> entries as generated by grokmirror 2.x.
91
92 If C<DIR> is not an absolute path, it is relative to the
93 C<DESTINATION> directory.  If only C<--objstore=> is specified
94 where C<DIR> is an empty string (C<"">), then C<objstore>
95 (C<$DESTINATION/objstore>) is the implied value of C<DIR>.
96
97 =item --manifest=FILE
98
99 When incrementally updating an existing mirror, load the given
100 manifest (typically C<manifest.js.gz>) to speed up updates.
101
102 If C<FILE> is not an absolute path, it is relative to the
103 C<DESTINATION> directory.  If only C<--manifest => is specified
104 where C<FILE > is an empty string (C<"">), then C<manifest.js.gz>
105 (C<$DESTINATION/manifest.js.gz>) is the implied value of C<FILE>.
106
107 =item -n
108
109 =item --dry-run
110
111 Show what would be done, without making any changes.
112
113 =item -q
114
115 =item --quiet
116
117 Quiets down progress messages, also passed to L<git-fetch(1)>.
118
119 =item -v
120
121 =item --verbose
122
123 Increases verbosity, also passed to L<git-fetch(1)>.
124
125 =item --torsocks=auto|no|yes
126
127 =item --no-torsocks
128
129 Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
130
131 Default: C<auto>
132
133 =back
134
135 =head1 CONTACT
136
137 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
138
139 The mail archives are hosted at L<https://public-inbox.org/meta/> and
140 L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
141
142 =head1 COPYRIGHT
143
144 Copyright all contributors L<mailto:meta@public-inbox.org>
145
146 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
147
148 =head1 SEE ALSO
149
150 L<public-inbox-fetch(1)>, L<public-inbox-init(1)>, L<public-inbox-index(1)>