diff --git a/btrbk b/btrbk index 987d1ff..09c11dc 100755 --- a/btrbk +++ b/btrbk @@ -4919,12 +4919,12 @@ sub print_header(@) } if($args{options} && (scalar @{$args{options}})) { print "\nOptions:\n "; - print join("\n ", @{$args{options}}); + print join("\n ", grep(defined, @{$args{options}})); print "\n"; } if($args{legend}) { print "\nLegend:\n "; - print join("\n ", @{$args{legend}}); + print join("\n ", grep(defined, @{$args{legend}})); print "\n"; } print "--------------------------------------------------------------------------------\n"; @@ -7054,7 +7054,14 @@ MAIN: } if(@subvol_out) { - push @out, "$svol->{PRINT}", @subvol_out, ""; + if($action_archive) { + my $snaproot = vinfo_snapshot_root($svol); + my $snapshot_basename = config_key($svol, "snapshot_name"); + push @out, "$snaproot->{PRINT}/${snapshot_basename}.*"; + } else { + push @out, "$svol->{PRINT}"; + } + push @out, @subvol_out, ""; } } } @@ -7065,14 +7072,14 @@ MAIN: push @cmdline_options, "$preserve_snapshots: Preserved all snapshots" if($preserve_snapshots); push @cmdline_options, "$preserve_backups: Preserved all backups" if($preserve_backups); - print_header(title => "Backup Summary", + print_header(title => $action_archive ? "Archive Summary" : "Backup Summary", config => $config, time => $start_time, options => \@cmdline_options, legend => [ - "=== up-to-date subvolume (source snapshot)", - "++. created directory", - "+++ created subvolume (source snapshot)", + $action_archive && "++. created directory", + $action_run && "=== up-to-date subvolume (source snapshot)", + $action_run && "+++ created subvolume (source snapshot)", "--- deleted subvolume", "*** received subvolume (non-incremental)", ">>> received subvolume (incremental)",