mirror of https://github.com/digint/btrbk
Merge branch 'enhance_output'
commit
1a536811ed
10
ChangeLog
10
ChangeLog
|
@ -2,13 +2,17 @@ btrbk-current
|
||||||
|
|
||||||
* Added configuration option "group".
|
* Added configuration option "group".
|
||||||
* Allow filtering subcommands by group as well as targets.
|
* Allow filtering subcommands by group as well as targets.
|
||||||
* Added "--raw-output" command line option, producing raw
|
* Added "config print" command.
|
||||||
(machine-readable) output for "(dry)run" and "tree" commands.
|
* Added "list" command (experimental).
|
||||||
* Added "config dump" command (experimental).
|
* Added "--format=table|long|raw" and "-t,--table" command line
|
||||||
|
options, producing tabular and raw (machine-readable) output for
|
||||||
|
"(dry)run", "tree" and "list" commands.
|
||||||
|
* Print scheduler details if -v option is set on action run/dryrun.
|
||||||
* Added configuration option "ssh_cipher_spec" (close: #47).
|
* Added configuration option "ssh_cipher_spec" (close: #47).
|
||||||
* Added "target raw", with GnuPG and compression support
|
* Added "target raw", with GnuPG and compression support
|
||||||
(experimental).
|
(experimental).
|
||||||
* Added configuration option "timestamp_format short|long".
|
* Added configuration option "timestamp_format short|long".
|
||||||
|
* Added transaction log (configuration option "transaction_log").
|
||||||
* Bugfix: correctly handle "incremental no" option.
|
* Bugfix: correctly handle "incremental no" option.
|
||||||
* Bugfix: return exit status 10 instead of 0 if one or more backup
|
* Bugfix: return exit status 10 instead of 0 if one or more backup
|
||||||
tasks aborted.
|
tasks aborted.
|
||||||
|
|
|
@ -64,6 +64,9 @@ snapshot_dir _btrbk_snap
|
||||||
# Set this either globally or in a specific "target" section.
|
# Set this either globally or in a specific "target" section.
|
||||||
#btrfs_progs_compat no
|
#btrfs_progs_compat no
|
||||||
|
|
||||||
|
# Enable transaction log
|
||||||
|
#transaction_log /var/log/btrbk_transaction.log
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Volume section: "volume <volume-directory>"
|
# Volume section: "volume <volume-directory>"
|
||||||
|
|
|
@ -37,12 +37,12 @@ valid mount-points, you can loop through the configuration and mount
|
||||||
the volumes like this:
|
the volumes like this:
|
||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
btrbk config dump volume | while read line; do
|
btrbk config list volume --format=raw | while read line; do
|
||||||
eval $line
|
eval $line
|
||||||
$volume_rsh mount $volume_path
|
$volume_rsh mount $volume_path
|
||||||
done
|
done
|
||||||
|
|
||||||
Note that the `btrbk config dump volume` command accepts filters (see
|
Note that the `btrbk config list` command accepts filters (see
|
||||||
[btrbk(1)], FILTER STATEMENTS), which means you can e.g. add "group
|
[btrbk(1)], FILTER STATEMENTS), which means you can e.g. add "group
|
||||||
automount" tags in your configuration and dump only the volumes of
|
automount" tags in your configuration and dump only the volumes of
|
||||||
this group: `btrbk config dump volume automount`.
|
this group: `btrbk config dump volume automount`.
|
||||||
|
|
69
doc/btrbk.1
69
doc/btrbk.1
|
@ -79,10 +79,17 @@ Set the level of verbosity. Accepted levels are warn, info, debug,
|
||||||
and trace.
|
and trace.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-raw\-output
|
\-t, \-\-table
|
||||||
.RS 4
|
.RS 4
|
||||||
Print raw (machine-readable) output. Changes output format for
|
Print output in table format (shortcut for "--format=table").
|
||||||
\fBrun\fR, \fBdryrun\fR and \fBtree\fR. Useful for further scripting.
|
.RE
|
||||||
|
.PP
|
||||||
|
\-\-format table|long|raw
|
||||||
|
.RS 4
|
||||||
|
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, \fBlist\fR and \fBtree\fR
|
||||||
|
commands. Useful for further exporting/scripting.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-\-progress
|
\-\-progress
|
||||||
|
@ -121,25 +128,8 @@ configured retention policy will be deleted. Note that the latest
|
||||||
snapshot as well as the latest backup is always preserved, regardless
|
snapshot as well as the latest backup is always preserved, regardless
|
||||||
of the retention policy.
|
of the retention policy.
|
||||||
.PP
|
.PP
|
||||||
If the \-\-raw\-output command line option is set, print the output in
|
Use the \fI\-\-format\fR command line option to switch between
|
||||||
the following format:
|
different output formats.
|
||||||
.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
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.B dryrun
|
.B dryrun
|
||||||
|
@ -151,12 +141,15 @@ in conjunction with \fI\-l debug\fR to see the btrfs commands that
|
||||||
would be executed.
|
would be executed.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.B info
|
.B list
|
||||||
[filter...]
|
[filter...]
|
||||||
.RS 4
|
.RS 4
|
||||||
Print filesystem usage information for all source/target
|
Print the source/snapshot/target relations of the configured
|
||||||
volumes. Optionally filtered by [filter...] arguments (see \fIFILTER
|
subvolumes in a tabular form. Optionally filtered by [filter...]
|
||||||
STATEMENTS\fR below).
|
arguments (see \fIFILTER STATEMENTS\fR below). Accepts predefined
|
||||||
|
filters \fIvolume\fR, \fIsource\fR and \fItarget\fR. Use the
|
||||||
|
\fI\-\-format\fR command line option to switch between different
|
||||||
|
output formats.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.B tree
|
.B tree
|
||||||
|
@ -164,15 +157,16 @@ STATEMENTS\fR below).
|
||||||
.RS 4
|
.RS 4
|
||||||
Print the snapshots and their corresponding backup subvolumes as a
|
Print the snapshots and their corresponding backup subvolumes as a
|
||||||
tree. Optionally filtered by [filter...] arguments (see \fIFILTER
|
tree. Optionally filtered by [filter...] arguments (see \fIFILTER
|
||||||
STATEMENTS\fR below).
|
STATEMENTS\fR below). Use the \fI\-\-format\fR command line option to
|
||||||
.PP
|
switch between different output formats.
|
||||||
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>
|
|
||||||
...
|
|
||||||
.RE
|
.RE
|
||||||
|
.PP
|
||||||
|
.B info
|
||||||
|
[filter...]
|
||||||
|
.RS 4
|
||||||
|
Print filesystem usage information for all source/target
|
||||||
|
volumes. Optionally filtered by [filter...] arguments (see \fIFILTER
|
||||||
|
STATEMENTS\fR below).
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.B origin
|
.B origin
|
||||||
|
@ -188,10 +182,11 @@ parent-child relationship as well as the received-from information.
|
||||||
Print new files since subvolume <from> for subvolume <to>.
|
Print new files since subvolume <from> for subvolume <to>.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.B config dump
|
.B config
|
||||||
volume|source|target [filter...] \fI*experimental*\fR
|
print|print-all
|
||||||
.RS 4
|
.RS 4
|
||||||
Dump parsed content from the configuration file, in format: key="value"...
|
Prints the parsed configuration file. Use the \fI\-\-format\fR command
|
||||||
|
line option to switch between different output formats.
|
||||||
.RE
|
.RE
|
||||||
.SH FILTER STATEMENTS
|
.SH FILTER STATEMENTS
|
||||||
Filter arguments are accepted in form:
|
Filter arguments are accepted in form:
|
||||||
|
|
|
@ -258,6 +258,13 @@ can lead to false guesses if the snapshot or target subvolumes are
|
||||||
manipulated by hand (moved, deleted).
|
manipulated by hand (moved, deleted).
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\fBtransaction_log\fR <file>
|
||||||
|
.RS 4
|
||||||
|
If set, all transactions (snapshot create, subvolume send-receive,
|
||||||
|
subvolume delete) as well as abort messages are logged to <file>, in a
|
||||||
|
space-separated table format.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
Lines that contain a hash character (#) in the first column are
|
Lines that contain a hash character (#) in the first column are
|
||||||
treated as comments.
|
treated as comments.
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
|
|
Loading…
Reference in New Issue