user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
833df862b556348dbe944e996d05df87033e2ccf blob 2317 bytes (raw)

  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
 
=head1 NAME

public-inbox-fetch - "git fetch" wrapper for v2 inbox mirrors

=head1 SYNOPSIS

public-inbox-fetch [--exit-code] -C INBOX_DIR

=head1 DESCRIPTION

public-inbox-fetch updates git storage of public-inbox mirrors.
With v2 inboxes, it allows detection of new epochs and avoids
unnecessary traffic on old epochs.

public-inbox-fetch does not use nor require any configuration
files of its own.

It does not run L<public-inbox-index(1)>, making it suitable
for maintaining git-only backups.

For v2 inboxes, it will maintain C<$INBOX_DIR/manifest.js.gz>
file to speed up future invocations.  It always safe to remove
manifest.js.gz, it is merely an optimization and will be
restored on the next invocation.

To prevent fetches on any v2 epoch, use L<chmod(1)> to remove
write permissions to the top-level of the epoch.  For example,
to disable fetches on epoch 4:

	chmod a-w $INBOX_DIR/git/4.git

If you wish to re-enable fetches to the epoch:

	chmod u+w $INBOX_DIR/git/4.git

=head1 OPTIONS

=over

=item -q

=item --quiet

Quiets down progress messages, also passed to L<git-fetch(1)>.

=item --exit-code

Exit with C<127> if no updates are done.  This can be used in
shell scripts to avoid invoking L<public-inbox-index(1)> when
there are no updates:

	public-inbox-fetch -q --exit-code && public-inbox-index
	test $? -eq 0 || exit $?

=item -v

=item --verbose

Increases verbosity, also passed to L<git-fetch(1)>.

=item --torsocks=auto|no|yes

=item --no-torsocks

Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.

Default: C<auto>

=back

=head1 EXIT CODES

=over

=item 127

no updates when L</--exit-code> is used above

=back

public-inbox-fetch will also exit with curl L<curl(1)/EXIT CODES>
as documented in the L<curl(1)> manpage (e.g. C<7> when curl cannot
reach a host).  Likewise, L<git-fetch(1)> failures are also
propagated to the user.

=head1 CONTACT

Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>

The mail archives are hosted at L<https://public-inbox.org/meta/> and
L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>

=head1 COPYRIGHT

Copyright all contributors L<mailto:meta@public-inbox.org>

License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>

=head1 SEE ALSO

L<public-inbox-index(1)>, L<curl(1)>
debug log:

solving 833df862 ...
found 833df862 in https://80x24.org/public-inbox.git

Code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).