=head1 SYNOPSIS
- public-inbox-compact INBOX_DIR
+public-inbox-compact INBOX_DIR
+
+public-inbox-compact --all
=head1 DESCRIPTION
=over
+=item --all
+
+Compact all inboxes configured in ~/.public-inbox/config.
+This is an alternative to specifying individual inboxes directories
+on the command-line.
+
=item --blocksize / --no-full / --fuller
These options are passed directly to L<xapian-compact(1)>.
public-inbox-index [OPTIONS] INBOX_DIR...
+public-inbox-index [OPTIONS] --all
+
=head1 DESCRIPTION
public-inbox-index creates and updates the search, overview and
It does not affect threading unless C<--rethread> is
used.
+=item --all
+
+Index all inboxes configured in ~/.public-inbox/config.
+This is an alternative to specifying individual inboxes directories
+on the command-line.
+
=item --rethread
Regenerate internal THREADID and message thread associations
=head1 SYNOPSIS
- public-inbox-xcpdb [OPTIONS] INBOX_DIR
+public-inbox-xcpdb [OPTIONS] INBOX_DIR
+
+public-inbox-xcpdb [OPTIONS] --all
=head1 DESCRIPTION
=over
+=item --all
+
+Copy all inboxes configured in ~/.public-inbox/config.
+This is an alternative to specifying individual inboxes directories
+on the command-line.
+
=item -c, --compact
In addition to performing the copy operation, run L<xapian-compact(1)>
PublicInbox::Admin::require_or_die('-index');
my $usage = "Usage: public-inbox-compact INBOX_DIR\n";
my $opt = { compact => 1, -coarse_lock => 1 };
-GetOptions($opt, @PublicInbox::Xapcmd::COMPACT_OPT) or
+GetOptions($opt, qw(all), @PublicInbox::Xapcmd::COMPACT_OPT) or
die "bad command-line args\n$usage";
-my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV) or die $usage;
+my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV, $opt) or die $usage;
foreach (@ibxs) {
my $ibx = PublicInbox::InboxWritable->new($_);
PublicInbox::Xapcmd::run($ibx, 'compact', $opt);
--no-fsync speed up indexing, risk corruption on power outage
-L LEVEL `basic', `medium', or `full' (default: full)
+ --all index all configured inboxes
--compact | -c run public-inbox-compact(1) after indexing
--sequential-shard index Xapian shards sequentially for slow storage
--jobs=NUM set or disable parallelization (NUM=0)
indexlevel|index-level|L=s max_size|max-size=s
batch_size|batch-size=s
sequential_shard|seq-shard|sequential-shard
- help|?))
+ all help|?))
or die "bad command-line args\n$usage";
if ($opt->{help}) { print $help; exit 0 };
die "--jobs must be >= 0\n" if defined $opt->{jobs} && $opt->{jobs} < 0;
PublicInbox::Admin::require_or_die('-index');
my $cfg = PublicInbox::Config->new; # Config is loaded by Admin
-my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV, undef, $cfg);
+my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV, $opt, $cfg);
PublicInbox::Admin::require_or_die('-index');
unless (@ibxs) { print STDERR "Usage: $usage\n"; exit 1 }
options:
--compact | -c run public-inbox-compact(1) after indexing
+ --all copy all configured inboxes
--reshard=NUM change number the number of shards
--jobs=NUM limit parallelism to JOBS count
--verbose | -v increase verbosity (may be repeated)
sequential_shard|seq-shard|sequential-shard
jobs|j=i quiet|q verbose|v
blocksize|b=s no-full|n fuller|F
- help|?)) or die "bad command-line args\n$usage";
+ all help|?)) or die "bad command-line args\n$usage";
if ($opt->{help}) { print $help; exit 0 };
use PublicInbox::Admin;
require PublicInbox::Config;
my $cfg = PublicInbox::Config->new;
-my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV, undef, $cfg) or
+my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV, $opt, $cfg) or
die $usage;
my $idx_env = PublicInbox::Admin::index_prepare($opt, $cfg);