mirror of https://github.com/digint/btrbk
btrbk: separate format for "ist snapshots"
Make sure target_subvolume is always printed for "resolved" format.pull/358/head
parent
28d4ec6a0b
commit
792c3de6c0
16
btrbk
16
btrbk
|
@ -203,12 +203,17 @@ my %table_formats = (
|
||||||
raw => [ qw( source_url source_host source_port source_subvolume snapshot_path snapshot_name target_url target_host target_port target_path target_type snapshot_preserve target_preserve source_rsh target_rsh ) ],
|
raw => [ qw( source_url source_host source_port source_subvolume snapshot_path snapshot_name target_url target_host target_port target_path target_type snapshot_preserve target_preserve source_rsh target_rsh ) ],
|
||||||
},
|
},
|
||||||
|
|
||||||
resolved => { table => [ qw( -source_host -source_port source_subvolume snapshot_subvolume status -target_host -target_port -target_subvolume ) ],
|
resolved => { table => [ qw( -source_host -source_port source_subvolume snapshot_subvolume status -target_host -target_port target_subvolume ) ],
|
||||||
long => [ qw( -source_host -source_port source_subvolume snapshot_subvolume status -target_host -target_port -target_subvolume -target_type ) ],
|
long => [ qw( -source_host -source_port source_subvolume snapshot_subvolume status -target_host -target_port target_subvolume target_type ) ],
|
||||||
raw => [ qw( type source_url source_host source_port source_path snapshot_path snapshot_name status target_url target_host target_port target_path target_type source_rsh target_rsh ) ],
|
raw => [ qw( type source_url source_host source_port source_path snapshot_path snapshot_name status target_url target_host target_port target_path target_type source_rsh target_rsh ) ],
|
||||||
# NOTE: snapshot_path is ambigous and does NOT print SUBVOL_PATH here (should be snapshot_subvolume, left as-is for compatibility)
|
# NOTE: snapshot_path is ambigous and does NOT print SUBVOL_PATH here (should be snapshot_subvolume, left as-is for compatibility)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
snapshots => { table => [ qw( -source_host -source_port source_subvolume snapshot_subvolume status ) ],
|
||||||
|
long => [ qw( -source_host -source_port source_subvolume snapshot_subvolume status ) ],
|
||||||
|
raw => [ qw( source_url source_host source_port source_path snapshot_subvolume snapshot_name status source_rsh ) ],
|
||||||
|
},
|
||||||
|
|
||||||
stats => { table => [ qw( -source_host -source_port source_subvolume snapshot_subvolume -target_host -target_port -target_subvolume snapshots -backups ) ],
|
stats => { table => [ qw( -source_host -source_port source_subvolume snapshot_subvolume -target_host -target_port -target_subvolume snapshots -backups ) ],
|
||||||
long => [ qw( -source_host -source_port source_subvolume snapshot_subvolume -target_host -target_port -target_subvolume snapshot_status backup_status snapshots -backups -correlated -orphaned -incomplete ) ],
|
long => [ qw( -source_host -source_port source_subvolume snapshot_subvolume -target_host -target_port -target_subvolume snapshot_status backup_status snapshots -backups -correlated -orphaned -incomplete ) ],
|
||||||
raw => [ qw( source_url source_host source_port source_subvolume snapshot_subvolume snapshot_name target_url target_host target_port target_subvolume snapshot_status backup_status snapshots backups correlated orphaned incomplete ) ],
|
raw => [ qw( source_url source_host source_port source_subvolume snapshot_subvolume snapshot_name target_url target_host target_port target_subvolume snapshot_status backup_status snapshots backups correlated orphaned incomplete ) ],
|
||||||
|
@ -405,7 +410,7 @@ commands:
|
||||||
archive <src> <dst> recursively copy all subvolumes
|
archive <src> <dst> recursively copy all subvolumes
|
||||||
clean delete incomplete (garbled) backups
|
clean delete incomplete (garbled) backups
|
||||||
stats print snapshot/backup statistics
|
stats print snapshot/backup statistics
|
||||||
list <subcommand> available subcommands are:
|
list <subcommand> available subcommands are (default "all"):
|
||||||
all snapshots and backups
|
all snapshots and backups
|
||||||
snapshots snapshots
|
snapshots snapshots
|
||||||
backups backups and correlated snapshots
|
backups backups and correlated snapshots
|
||||||
|
@ -6825,7 +6830,10 @@ MAIN:
|
||||||
[ { a => $stats{snapshots}, b => "snapshots", c => " " },
|
[ { a => $stats{snapshots}, b => "snapshots", c => " " },
|
||||||
{ a => $stats{backups}, b => "backups", c => $bflags } ],
|
{ a => $stats{backups}, b => "backups", c => $bflags } ],
|
||||||
output_format => "table", no_header => 1);
|
output_format => "table", no_header => 1);
|
||||||
}
|
}
|
||||||
|
elsif($action_resolve eq "snapshots") {
|
||||||
|
print_formatted("snapshots", \@data);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
print_formatted("resolved", \@data);
|
print_formatted("resolved", \@data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue