From 3fe746ed64c383c6ceb403c48b2a3fdeb3af200c Mon Sep 17 00:00:00 2001 From: teesid Date: Fri, 29 Jun 2018 09:36:10 +0700 Subject: [PATCH] btrbk: it is now possible to back up a subvolume that is already mounted at /. It works with the configuration snippet below: ``` volume / subvolume . snapshot_create ondemand snapshot_name root target send-receive /mnt/ext-backup/snapshots ``` --- btrbk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/btrbk b/btrbk index f4a76c1..e35b9fb 100755 --- a/btrbk +++ b/btrbk @@ -5303,7 +5303,10 @@ MAIN: WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt"; next; } - if($svol->{node}{uuid} && _is_child_of($sroot->{node}, $svol->{node}{uuid})) { + if($svol->{node}{uuid} && + (_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 subtree of: $sroot->{PRINT}"; } else { ABORTED($svol, "Not a child subvolume of: $sroot->{PRINT}");