digint / btrbk

Tool for creating snapshots and remote backups of btrfs subvolumes
https://digint.ch/btrbk/
GNU General Public License v3.0
1.69k stars 122 forks source link

Why abort when Received UUID set? #265

Open Geremia opened 5 years ago

Geremia commented 5 years ago

What is the purpose of aborting when the Received UUID is set?

Line 5365:

      if($svol->{node}{received_uuid} ne '-') {
        ABORTED($svol, "\"Received UUID\" is set");
        WARN "Skipping subvolume \"$svol->{PRINT}\": $abrt";
        next;
}

Is this really necessary?

digint commented 5 years ago

This is part of commit: 356231bc2a8bbc640f1375f39f985ec2e6d939e0 See FAQ entry on this: I'm getting an error: Aborted: "Received UUID" is 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".

checked again, this is still true for btrfs-progs v4.19.1

amo13 commented 2 years ago

I am stumbling upon the same thing:

My system root on archlinux is a subvolume named @root (id=257) inside the btrfs root (id=5) which I normally do not mount at all. Now, I created a mountpoint in /.rootfs for the btrfs root (id=5) so I can set volume /.rootfs and subvolume @root in my btrbk.conf.

When I launch a dryrun, I am told that WARNING: Skipping subvolume "/.rootfs/@root": "Received UUID" is set. Why can't I backup my linux root? Is there something I can change to make it work?

Any help would be greatly appreciated.

amo13 commented 2 years ago

alright, I guess I figured out a workaround:

I hot-flipped the readonly property of my system root. (Yes, I like living on the edge...) This resets the Received UUID property of the subvolume in question. sudo btrfs prop set /.rootfs/@root ro true && sudo btrfs prop set -f /.rootfs/@root ro false

Since I don't plan on doing incremental sends of my root subvolume, I hope that everything is fine that way. I start fresh with an initial send.

Hopefully this note can help other people landing here.