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