diff --git a/ChangeLog b/ChangeLog index 4ff1cd3..f12a289 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +btrbk-current + + * Bugfix: assume unreachable target as clean on snapshot creation if + snapshot_create_always is set (closes: #19). + btrbk-0.17.0 * New versioning scheme using more common three-level versions. diff --git a/btrbk b/btrbk index 7b35d36..6c459f5 100755 --- a/btrbk +++ b/btrbk @@ -47,7 +47,7 @@ use Date::Calc qw(Today Delta_Days Day_of_Week); use Getopt::Std; use Data::Dumper; -our $VERSION = "0.17.0"; +our $VERSION = "0.17.1-dev"; our $AUTHOR = 'Axel Burri '; our $PROJECT_HOME = ''; @@ -1719,9 +1719,14 @@ MAIN: } # find unique snapshot name + my @unconfirmed_target_name; my @lookup = keys %{vinfo_subvol_list($sroot)}; @lookup = grep s/^\Q$snapdir\E\/// , @lookup; foreach my $config_target (@{$config_subvol->{TARGET}}) { + if($config_target->{ABORTED}) { + push(@unconfirmed_target_name, vinfo($config_target->{url}, $config_target)); + next; + } my $droot = $config_target->{droot} || die; push(@lookup, keys %{vinfo_subvol_list($droot)}); } @@ -1733,6 +1738,10 @@ MAIN: $postfix_counter++; my $snapshot_name = $snapshot_basename . '.' . $timestamp . ($postfix_counter ? "_$postfix_counter" : ""); + if(@unconfirmed_target_name) { + INFO "Failed to check all targets, assuming non-present subvolume \"$snapshot_name\" in: " . join(", ", map { "\"$_->{PRINT}\"" } @unconfirmed_target_name); + } + # finally create the snapshot INFO "Creating subvolume snapshot for: $svol->{PRINT}"; if(btrfs_subvolume_snapshot($svol, "$sroot->{PATH}/$snapdir/$snapshot_name")) {