mirror of https://github.com/digint/btrbk
btrbk: add --print-schedule command line option
parent
78bfc5b885
commit
ceb4dbf19c
8
btrbk
8
btrbk
|
@ -153,7 +153,7 @@ my %table_formats = (
|
||||||
|
|
||||||
schedule => { table => [ qw( action host subvol scheme reason ) ],
|
schedule => { table => [ qw( action host subvol scheme reason ) ],
|
||||||
long => [ qw( action host root_path subvol_path scheme reason ) ],
|
long => [ qw( action host root_path subvol_path scheme reason ) ],
|
||||||
raw => [ qw( topic action url host path dow d m w) ],
|
raw => [ qw( topic action url host path dow d w m y) ],
|
||||||
},
|
},
|
||||||
|
|
||||||
usage => { table => [ qw( host path size used free ) ],
|
usage => { table => [ qw( host path size used free ) ],
|
||||||
|
@ -223,6 +223,7 @@ sub HELP_MESSAGE
|
||||||
print STDERR " -l, --loglevel=LEVEL set logging level (warn, info, debug, trace)\n";
|
print STDERR " -l, --loglevel=LEVEL set logging level (warn, info, debug, trace)\n";
|
||||||
print STDERR " -t, --table change output to table format\n";
|
print STDERR " -t, --table change output to table format\n";
|
||||||
print STDERR " --format=FORMAT change output format, FORMAT=table|long|raw\n";
|
print STDERR " --format=FORMAT change output format, FORMAT=table|long|raw\n";
|
||||||
|
print STDERR " --print-schedule print scheduler details (for the \"run\" command)\n";
|
||||||
print STDERR " --progress show progress bar on send-receive operation\n";
|
print STDERR " --progress show progress bar on send-receive operation\n";
|
||||||
print STDERR "\n";
|
print STDERR "\n";
|
||||||
print STDERR "commands:\n";
|
print STDERR "commands:\n";
|
||||||
|
@ -2915,7 +2916,7 @@ MAIN:
|
||||||
my %config_override_opts;
|
my %config_override_opts;
|
||||||
|
|
||||||
|
|
||||||
my ($config_cmdline, $quiet, $verbose, $preserve_backups, $resume_only);
|
my ($config_cmdline, $quiet, $verbose, $preserve_backups, $resume_only, $print_schedule);
|
||||||
unless(GetOptions(
|
unless(GetOptions(
|
||||||
'help|h' => sub { VERSION_MESSAGE(); HELP_MESSAGE(0); exit 0; },
|
'help|h' => sub { VERSION_MESSAGE(); HELP_MESSAGE(0); exit 0; },
|
||||||
'version' => sub { VERSION_MESSAGE(); exit 0; },
|
'version' => sub { VERSION_MESSAGE(); exit 0; },
|
||||||
|
@ -2929,6 +2930,7 @@ MAIN:
|
||||||
'progress' => \$show_progress,
|
'progress' => \$show_progress,
|
||||||
'table|t' => sub { $output_format = "table" },
|
'table|t' => sub { $output_format = "table" },
|
||||||
'format=s' => \$output_format,
|
'format=s' => \$output_format,
|
||||||
|
'print-schedule' => \$print_schedule,
|
||||||
# 'override=s' => \%config_override_opts, # e.g. --override=incremental=no
|
# 'override=s' => \%config_override_opts, # e.g. --override=incremental=no
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
|
@ -4285,7 +4287,7 @@ MAIN:
|
||||||
#
|
#
|
||||||
# print scheduling results
|
# print scheduling results
|
||||||
#
|
#
|
||||||
if($loglevel >= 2) {
|
if($print_schedule) {
|
||||||
my @data = map { { %$_, vinfo_prefixed_keys("", $_->{value}) }; } @$schedule_results;
|
my @data = map { { %$_, vinfo_prefixed_keys("", $_->{value}) }; } @$schedule_results;
|
||||||
my @data_snapshot = grep { $_->{topic} eq "snapshot" } @data;
|
my @data_snapshot = grep { $_->{topic} eq "snapshot" } @data;
|
||||||
my @data_backup = grep { $_->{topic} eq "backup" } @data;
|
my @data_backup = grep { $_->{topic} eq "backup" } @data;
|
||||||
|
|
14
doc/btrbk.1
14
doc/btrbk.1
|
@ -1,4 +1,4 @@
|
||||||
.TH "btrbk" "1" "2016-02-03" "btrbk v0.22.2" ""
|
.TH "btrbk" "1" "2016-04-09" "btrbk v0.23.0-dev" ""
|
||||||
.\" disable hyphenation
|
.\" disable hyphenation
|
||||||
.nh
|
.nh
|
||||||
.\" disable justification (adjust text to left margin only)
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
@ -11,7 +11,7 @@ btrbk \- backup tool for btrfs volumes
|
||||||
[\-n|\-\-dry\-run] [\-p|\-\-preserve] [\-r|\-\-resume\-only]
|
[\-n|\-\-dry\-run] [\-p|\-\-preserve] [\-r|\-\-resume\-only]
|
||||||
[\-v|\-\-verbose] [\-q|\-\-quiet] [\-l|\-\-loglevel <level>]
|
[\-v|\-\-verbose] [\-q|\-\-quiet] [\-l|\-\-loglevel <level>]
|
||||||
[\-t|\-\-table] [\-\-format <output\-format>]
|
[\-t|\-\-table] [\-\-format <output\-format>]
|
||||||
[\-\-progress]
|
[\-\-progress] [\-\-print\-schedule]
|
||||||
<command> [<args>]
|
<command> [<args>]
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@ -74,8 +74,7 @@ set to \[lq]yes\[rq] in the configuration file.
|
||||||
.PP
|
.PP
|
||||||
\-v, \-\-verbose
|
\-v, \-\-verbose
|
||||||
.RS 4
|
.RS 4
|
||||||
Verbose output. Sets "\-l info", and prints detailed scheduler
|
Verbose output (shortcut for "\-\-loglevel=info").
|
||||||
information on "run" and "dryrun" commands.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-q, \-\-quiet
|
\-q, \-\-quiet
|
||||||
|
@ -107,6 +106,13 @@ commands. Useful for further exporting/scripting.
|
||||||
.RS 4
|
.RS 4
|
||||||
Show progress bar on send-receive operation.
|
Show progress bar on send-receive operation.
|
||||||
.RE
|
.RE
|
||||||
|
.PP
|
||||||
|
\-\-print\-schedule
|
||||||
|
.RS 4
|
||||||
|
Print detailed scheduler information on "run" and "dryrun"
|
||||||
|
commands. Use the \fI\-\-format\fR command line option to switch
|
||||||
|
between different output formats.
|
||||||
|
.RE
|
||||||
.SH COMMANDS
|
.SH COMMANDS
|
||||||
.PP
|
.PP
|
||||||
.B run
|
.B run
|
||||||
|
|
Loading…
Reference in New Issue