mirror of https://github.com/digint/btrbk
btrbk: look in the correct directory for btrbk list snapshots
parent
6669855936
commit
31475a303f
10
btrbk
10
btrbk
|
@ -6721,8 +6721,9 @@ MAIN:
|
||||||
foreach my $sroot (vinfo_subsection($config, 'volume')) {
|
foreach my $sroot (vinfo_subsection($config, 'volume')) {
|
||||||
foreach my $svol (vinfo_subsection($sroot, 'subvolume')) {
|
foreach my $svol (vinfo_subsection($sroot, 'subvolume')) {
|
||||||
my $snapshot_name = config_key($svol, "snapshot_name") // die;
|
my $snapshot_name = config_key($svol, "snapshot_name") // die;
|
||||||
# note: we list all snapshot children within $sroot here, not only the ones matching btrbk naming
|
my $snaproot = vinfo_snapshot_root($svol);
|
||||||
foreach my $snapshot (sort { $a->{node}{cgen} <=> $b->{node}{cgen} } get_related_snapshots($sroot, $svol)) {
|
# note: we list all snapshot children within $snaproot here, not only the ones matching btrbk naming
|
||||||
|
foreach my $snapshot (sort { $a->{node}{cgen} <=> $b->{node}{cgen} } get_related_snapshots($snaproot, $svol)) {
|
||||||
my $snapshot_data = { type => "snapshot",
|
my $snapshot_data = { type => "snapshot",
|
||||||
status => ($snapshot->{node}{cgen} == $svol->{node}{gen}) ? "up-to-date" : undef,
|
status => ($snapshot->{node}{cgen} == $svol->{node}{gen}) ? "up-to-date" : undef,
|
||||||
vinfo_prefixed_keys("source", $svol),
|
vinfo_prefixed_keys("source", $svol),
|
||||||
|
@ -6753,8 +6754,9 @@ MAIN:
|
||||||
foreach my $sroot (vinfo_subsection($config, 'volume')) {
|
foreach my $sroot (vinfo_subsection($config, 'volume')) {
|
||||||
foreach my $svol (vinfo_subsection($sroot, 'subvolume')) {
|
foreach my $svol (vinfo_subsection($sroot, 'subvolume')) {
|
||||||
my $snapshot_name = config_key($svol, "snapshot_name") // die;
|
my $snapshot_name = config_key($svol, "snapshot_name") // die;
|
||||||
# note: we list all snapshot children within $sroot here, not only the ones matching btrbk naming
|
my $snaproot = vinfo_snapshot_root($svol);
|
||||||
my @related_snapshots = get_related_snapshots($sroot, $svol);
|
# note: we list all snapshot children within $snaproot here, not only the ones matching btrbk naming
|
||||||
|
my @related_snapshots = get_related_snapshots($snaproot, $svol);
|
||||||
my $stats_snapshot_uptodate = "";
|
my $stats_snapshot_uptodate = "";
|
||||||
foreach my $snapshot (@related_snapshots) {
|
foreach my $snapshot (@related_snapshots) {
|
||||||
if($snapshot->{node}{cgen} == $svol->{node}{gen}) {
|
if($snapshot->{node}{cgen} == $svol->{node}{gen}) {
|
||||||
|
|
Loading…
Reference in New Issue