From 12d435d42a590aa985336614393705c335dcf18e Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Sat, 30 Apr 2016 13:01:12 +0200 Subject: [PATCH] btrbk: explain "orphaned" status in "stats" command, and suppress it on "list backups" command --- ChangeLog | 2 ++ btrbk | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6a1c8ea..cfd638a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ btrbk-current (close: #85). * Add syslog output of transaction log (close #82). * Do not print headers to transaction log anymore. + * Explain "orphaned" status in "stats" command, and suppress it on + "list backups" command (close: #76). btrbk-0.23.0 diff --git a/btrbk b/btrbk index 078ae64..76a6a93 100755 --- a/btrbk +++ b/btrbk @@ -4472,7 +4472,9 @@ MAIN: if($target_vol->{btrbk_direct_leaf} && ($target_vol->{node}{BTRBK_BASENAME} eq $snapshot_name)) { if($incomplete_backup) { $stats_incomplete++; } else { $stats_orphaned++; } push @data, { type => "received", - status => ($incomplete_backup ? "incomplete" : "orphaned"), + # suppress "orphaned" status here (snapshot column is empty anyways) + # status => ($incomplete_backup ? "incomplete" : "orphaned"), + status => ($incomplete_backup ? "incomplete" : undef), vinfo_prefixed_keys("target", $target_vol), vinfo_prefixed_keys("source", $svol), }; @@ -4535,6 +4537,10 @@ MAIN: print_header(title => "Statistics", config => $config, time => $start_time, + legend => [ + "up-to-date: latest snapshot is up to date with parent subvolume", + "orphaned : parent snapshot was deleted (by snapshot_preserve policy)", + ], ); print_table(\@stats_data, " ");