btrbk: allow subvolume filtering on "tree" action

pull/30/head
Axel Burri 2015-05-26 19:26:39 +02:00
parent 6e23f1d5b3
commit 7f7b6477d2
3 changed files with 9 additions and 5 deletions

View File

@ -3,8 +3,8 @@ btrbk-current
* Added "snapshot_create onchange", which skips snapshot creation if
the latest snapshot is up-to-date (i.e. has same generation as the
source subvolume).
* Improved handling of command line subvolume filter for run/dryrun
action (closes: #21).
* Improved handling of command line subvolume filter for "run",
"dryrun" and "tree" actions (closes: #21).
btrbk-0.18.0

7
btrbk
View File

@ -141,8 +141,8 @@ sub HELP_MESSAGE
print STDERR "commands:\n";
print STDERR " run [subvol...] perform backup operations as defined in the config file\n";
print STDERR " dryrun [subvol...] don't run btrfs commands; show what would be executed\n";
print STDERR " tree [subvol...] shows backup tree\n";
print STDERR " info print useful filesystem information\n";
print STDERR " tree shows backup tree\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";
print STDERR "\n";
@ -1374,6 +1374,9 @@ MAIN:
}
elsif ($command eq "tree") {
$action_tree = 1;
$args_expected_min = 0;
$args_expected_max = 9999;
@subvol_args = @ARGV;
}
elsif ($command eq "diff") {
$action_diff = 1;
@ -1572,7 +1575,7 @@ MAIN:
#
# filter subvolumes matching command line arguments
#
if($action_run && scalar(@subvol_args))
if(($action_run || $action_tree) && scalar(@subvol_args))
{
my $filter_count = undef;
$config->{RUN_FILTER} = [];

View File

@ -1,4 +1,4 @@
.TH "btrbk" "1" "2015-05-25" "btrbk v0.18.0" ""
.TH "btrbk" "1" "2015-05-26" "btrbk v0.18.0" ""
.SH NAME
btrbk \- backup tool for btrfs volumes
.SH SYNOPSIS
@ -90,6 +90,7 @@ Print filesystem usage information for all source/target volumes.
.RE
.PP
.B tree
[subvolume...]
.RS 4
Print the snapshots and their corresponding backup subvolumes as a
tree.