mirror of https://github.com/digint/btrbk
btrbk: abort subvolume if it is btrfs root (id=5)
Btrfs root subvolume (id=5) have no UUID and cannot be backed up. Abort if "subvolume ." is configured on btrfs root, e.g.: volume /path/to/btrfs_root subvolume .pull/245/head
parent
b0d58fd0f1
commit
de5004c744
10
btrbk
10
btrbk
|
@ -5309,6 +5309,11 @@ MAIN:
|
|||
WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt";
|
||||
next;
|
||||
}
|
||||
if((not $svol->{node}{uuid}) || ($svol->{node}{uuid} eq '-')) {
|
||||
ABORTED($svol, "subvolume has no UUID");
|
||||
ERROR "Skipping subvolume \"$svol->{PRINT}\": $abrt";
|
||||
next;
|
||||
}
|
||||
if($svol->{node}{readonly}) {
|
||||
ABORTED($svol, "subvolume is readonly");
|
||||
WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt";
|
||||
|
@ -5319,9 +5324,8 @@ MAIN:
|
|||
WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt";
|
||||
next;
|
||||
}
|
||||
if($svol->{node}{uuid} &&
|
||||
(_is_child_of($sroot->{node}, $svol->{node}{uuid}) ||
|
||||
($svol->{node}{uuid} eq $sroot->{node}{uuid})))
|
||||
if(_is_child_of($sroot->{node}, $svol->{node}{uuid}) ||
|
||||
($svol->{node}{uuid} eq $sroot->{node}{uuid}))
|
||||
{
|
||||
DEBUG "Found \"$svol->{PRINT}\" (id=$svol->{node}{id}) in btrfs tree of: $sroot->{PRINT}";
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue