diff --git a/ChangeLog b/ChangeLog index 5d29af1..7c9fd0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ btrbk-current * Added configuration option "group". * Allow filtering subcommands by group as well as targets. + * Added "--raw-output" command line option, producing raw + (machine-readable) output for "(dry)run" and "tree" commands. * Added configuration option "ssh_cipher_spec" (close: #47). * Hardened ssh_filter_btrbk.sh script: fine-grained access control, restrict-path option, sudo option (close: #45) diff --git a/btrbk b/btrbk index 9ba0e93..f89b5d0 100755 --- a/btrbk +++ b/btrbk @@ -147,6 +147,7 @@ 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 " --progress show progress bar on send-receive operation\n"; print STDERR "\n"; print STDERR "commands:\n"; diff --git a/doc/btrbk.1 b/doc/btrbk.1 index 2a98027..a010e5b 100644 --- a/doc/btrbk.1 +++ b/doc/btrbk.1 @@ -74,6 +74,12 @@ Set the level of verbosity. Accepted levels are warn, info, debug, and trace. .RE .PP +\-\-raw\-output +.RS 4 +Print raw (machine-readable) output. Changes output format for +\fBrun\fR, \fBdryrun\fR and \fBtree\fR. Useful for further scripting. +.RE +.PP \-\-progress .RS 4 Show progress bar on send-receive operation. @@ -109,6 +115,26 @@ snapshots and backup subvolumes that are not preserved by their 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 +... +.RE +.RS 4 +receive [] +... +.RE +.RS 4 +delete +... +.RE +.RS 4 +aborted [volume|subvolume|target] -- abort_reason +... +.RE .RE .PP .B dryrun @@ -134,6 +160,14 @@ STATEMENTS\fR below). 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 + +... +.RE .RE .PP .B origin