]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/public-inbox-clone.pod
clone: flesh out --objstore behavior and document
[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 without C<DIR>, then C<objstore> (C<$DESTINATION/objstore>)
95 is the implied value of C<DIR>.
96
97 =item -n
98
99 =item --dry-run
100
101 Show what would be done, without making any changes.
102
103 =item -q
104
105 =item --quiet
106
107 Quiets down progress messages, also passed to L<git-fetch(1)>.
108
109 =item -v
110
111 =item --verbose
112
113 Increases verbosity, also passed to L<git-fetch(1)>.
114
115 =item --torsocks=auto|no|yes
116
117 =item --no-torsocks
118
119 Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
120
121 Default: C<auto>
122
123 =back
124
125 =head1 CONTACT
126
127 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
128
129 The mail archives are hosted at L<https://public-inbox.org/meta/> and
130 L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
131
132 =head1 COPYRIGHT
133
134 Copyright all contributors L<mailto:meta@public-inbox.org>
135
136 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
137
138 =head1 SEE ALSO
139
140 L<public-inbox-fetch(1)>, L<public-inbox-init(1)>, L<public-inbox-index(1)>