mirror of https://github.com/digint/btrbk
btrbk: bugfix: do not read target btrfs tree on "btrbk snapshot --preserve"
If running "btrbk snapshot --preserve", there is no need to initialize targets, and we don't want to warn and fail (exitcode=10) on missing targets.pull/235/head
parent
17f41118d3
commit
c8fcb01bc2
|
@ -8,6 +8,8 @@ btrbk-0.27.0-dev
|
|||
(close #217). Note that this change may result in (previously
|
||||
preserved) backups to be deleted!
|
||||
* Bugfix: add "btrfs filesystem usage" backend mapping (close #222).
|
||||
* Bugfix: do not fail (exitcode=10) if targets are not accessible on
|
||||
"btrfs snapshot --preserve".
|
||||
* Enhance internal data structures:
|
||||
- Allow snapshot_dir to be a mountpoint.
|
||||
- Search complete target tree for correlated subvolumes.
|
||||
|
|
7
btrbk
7
btrbk
|
@ -5313,6 +5313,12 @@ MAIN:
|
|||
}
|
||||
|
||||
# read target btrfs tree
|
||||
if($action_run && $skip_backups && $preserve_snapshots && $preserve_backups) {
|
||||
# if running "btrbk snapshot --preserve", there is no need to
|
||||
# initialize targets, and we don't want to fail on missing targets.
|
||||
DEBUG "Skipping target tree readin (preserving all snapshots and backups)";
|
||||
}
|
||||
else {
|
||||
foreach my $sroot (vinfo_subsection($config, 'volume')) {
|
||||
foreach my $svol (vinfo_subsection($sroot, 'subvolume')) {
|
||||
foreach my $droot (vinfo_subsection($svol, 'target')) {
|
||||
|
@ -5342,6 +5348,7 @@ MAIN:
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# check for duplicate snapshot locations
|
||||
my %snapshot_check;
|
||||
|
|
Loading…
Reference in New Issue