btrbk: bugfix: do not keep latest common snapshot for "incremental no"

There is no reason to keep the latest common source snapshot if
"incremental no" is configured (see #252).
pull/208/merge
Axel Burri 2018-10-02 17:22:57 +02:00
parent 1862bc16d3
commit 3528927ea6
2 changed files with 14 additions and 10 deletions

View File

@ -11,6 +11,8 @@ btrbk-0.27.0-dev
* Bugfix: add "btrfs filesystem usage" backend mapping (close #222).
* Bugfix: do not fail (exitcode=10) if targets are not accessible on
"btrfs snapshot --preserve".
* Bugfix: if "incremental no" is configured on target, do not keep
latest common snapshot.
* Enhance internal data structures:
- Allow snapshot_dir to be a mountpoint.
- Search complete target tree for correlated subvolumes.

4
btrbk
View File

@ -5990,7 +5990,8 @@ MAIN:
next;
}
# always preserve latest common snapshot/backup pair
# preserve latest common snapshot/backup (for incremental targets)
if(config_key($droot, "incremental")) {
foreach my $child (@snapshot_children) {
my @receive_targets = get_receive_targets($droot, $child, exact => 1);
if(scalar(@receive_targets)) {
@ -6003,6 +6004,7 @@ MAIN:
last;
}
}
}
if($preserve_backups) {
INFO "Preserving all backups";