diff --git a/ChangeLog b/ChangeLog index 176106f..8f0e778 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/btrbk b/btrbk index 5c51be8..b48f707 100755 --- a/btrbk +++ b/btrbk @@ -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 print origin information for subvolume\n"; print STDERR " diff shows new files since subvolume for subvolume \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} = []; diff --git a/doc/btrbk.1 b/doc/btrbk.1 index 64f3eb4..c0150f0 100644 --- a/doc/btrbk.1 +++ b/doc/btrbk.1 @@ -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.