documentation: add "--format=table|long|raw" command line option

pull/57/head
Axel Burri 2015-10-11 20:14:32 +02:00
parent b65602f848
commit 956b010143
3 changed files with 23 additions and 34 deletions

View File

@ -4,9 +4,9 @@ btrbk-current
* Allow filtering subcommands by group as well as targets.
* Added "config print" command.
* Added "list" command (experimental).
* Added "--format=table|raw" command line option, producing tabular
and raw (machine-readable) output for "(dry)run", "tree" and
"list" commands.
* Added "--format=table|long|raw" command line option, producing
tabular and raw (machine-readable) output for "(dry)run", "tree"
and "list" commands.
* Added configuration option "ssh_cipher_spec" (close: #47).
* Added "target raw", with GnuPG and compression support
(experimental).

3
btrbk
View File

@ -155,13 +155,14 @@ sub HELP_MESSAGE
print STDERR " -v, --verbose be verbose (set loglevel=info)\n";
print STDERR " -q, --quiet be quiet (do not print summary for the \"run\" command)\n";
print STDERR " -l, --loglevel=LEVEL set logging level (warn, info, debug, trace)\n";
print STDERR " --raw-output print raw (machine-readable) output\n";
print STDERR " --format=FORMAT change output format, FORMAT=table|long|raw\n";
print STDERR " --progress show progress bar on send-receive operation\n";
print STDERR "\n";
print STDERR "commands:\n";
print STDERR " run [filter...] perform backup operations as defined in the config file\n";
print STDERR " dryrun [filter...] don't run btrfs commands; show what would be executed\n";
print STDERR " tree [filter...] shows backup tree\n";
print STDERR " list [filter...] print source/snapshot/target relations\n";
print STDERR " info [filter...] print useful filesystem information\n";
print STDERR " origin <subvol> print origin information for subvolume\n";
print STDERR " diff <from> <to> shows new files since subvolume <from> for subvolume <to>\n";

View File

@ -79,10 +79,12 @@ Set the level of verbosity. Accepted levels are warn, info, debug,
and trace.
.RE
.PP
\-\-raw\-output
\-\-format table|long|raw
.RS 4
Print raw (machine-readable) output. Changes output format for
\fBrun\fR, \fBdryrun\fR and \fBtree\fR. Useful for further scripting.
Print output in specified format. If set to "raw", prints
space-separated key="value" pairs (machine-readable). Affects output
format for \fBrun\fR, \fBdryrun\fR, \fBinfo\fR and \fBtree\fR
commands. Useful for further exporting/scripting.
.RE
.PP
\-\-progress
@ -121,25 +123,8 @@ configured retention policy will be deleted. Note that the latest
snapshot as well as the latest backup is always preserved, regardless
of the retention policy.
.PP
If the \-\-raw\-output command line option is set, print the output in
the following format:
.PP
.RS 4
snapshot <snapshot-url> <src-subvol-url>
...
.RE
.RS 4
receive <target-url> <src-subvol-url> [<parent-subvol-url>]
...
.RE
.RS 4
delete <target-url>
...
.RE
.RS 4
aborted [volume|subvolume|target] <url> -- abort_reason
...
.RE
Use the \fI\-\-format\fR command line option to switch between
different output formats.
.RE
.PP
.B dryrun
@ -164,15 +149,18 @@ STATEMENTS\fR below).
.RS 4
Print the snapshots and their corresponding backup subvolumes as a
tree. Optionally filtered by [filter...] arguments (see \fIFILTER
STATEMENTS\fR below).
.PP
If the \-\-raw\-output command line option is set, print the output in
the following format:
.PP
.RS 4
<subvol-url> <snapshot-url> <received-from-url>
...
STATEMENTS\fR below). Use the \fI\-\-format\fR command line option to
switch between different output formats.
.RE
.PP
.B list
[filter...]
.RS 4
Print the source/snapshot/target relations of the configured
subvolumes in a tabular form. Optionally filtered by [filter...]
arguments (see \fIFILTER STATEMENTS\fR below). Use the
\fI\-\-format\fR command line option to switch between different
output formats.
.RE
.PP
.B origin