mirror of https://github.com/digint/btrbk
btrbk: abort if source subvolume has readonly or received_uuid flag
parent
59cc728d90
commit
356231bc2a
|
@ -5,6 +5,8 @@ btrbk-current
|
||||||
and "lockfile" configuration options.
|
and "lockfile" configuration options.
|
||||||
* Show "up-to-date" status for backups in "stats" command.
|
* Show "up-to-date" status for backups in "stats" command.
|
||||||
* Show "correlated" status instead of "orphaned" in "stats" command.
|
* Show "correlated" status instead of "orphaned" in "stats" command.
|
||||||
|
* Check source subvolumes for readonly and received_uuid flags, and
|
||||||
|
abort if one of them is set.
|
||||||
|
|
||||||
btrbk-0.25.0
|
btrbk-0.25.0
|
||||||
|
|
||||||
|
|
10
btrbk
10
btrbk
|
@ -4534,6 +4534,16 @@ MAIN:
|
||||||
WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt";
|
WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
if($svol->{node}{readonly}) {
|
||||||
|
ABORTED($svol, "subvolume is readonly");
|
||||||
|
WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
if($svol->{node}{received_uuid} ne '-') {
|
||||||
|
ABORTED($svol, "\"Received UUID\" is set");
|
||||||
|
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})) {
|
||||||
DEBUG "Found \"$svol->{PRINT}\" (id=$svol->{node}{id}) in btrfs subtree of: $sroot->{PRINT}";
|
DEBUG "Found \"$svol->{PRINT}\" (id=$svol->{node}{id}) in btrfs subtree of: $sroot->{PRINT}";
|
||||||
} else {
|
} else {
|
||||||
|
|
18
doc/FAQ.md
18
doc/FAQ.md
|
@ -260,3 +260,21 @@ This approach has the advantage that you don't need to reformat your
|
||||||
USB disk. This works fine, but be aware that you may run into trouble
|
USB disk. This works fine, but be aware that you may run into trouble
|
||||||
if a single stream gets corrupted, making all subsequent streams
|
if a single stream gets corrupted, making all subsequent streams
|
||||||
unusable.
|
unusable.
|
||||||
|
|
||||||
|
|
||||||
|
I'm getting an error: Aborted: "Received UUID" is set
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
You probably restored a backup with send-receive, and made it
|
||||||
|
read/write using `btrfs property set`. This is bad, as all snapshots
|
||||||
|
and backups will inherit this identical "Received UUID", which results
|
||||||
|
in all these subvolumes will be treated as "containing same data".
|
||||||
|
|
||||||
|
To fix this, create a "proper" snapshot:
|
||||||
|
|
||||||
|
# cd /mnt/btr_pool
|
||||||
|
# mv mysubvolume mysubvolume.broken
|
||||||
|
# btrfs subvolume snapshot mysubvolume.broken mysubvolume
|
||||||
|
|
||||||
|
Now, `mysubvolume` should have an empty "Received UUID", and btrbk
|
||||||
|
will not complain any more.
|
||||||
|
|
Loading…
Reference in New Issue