Open camoz opened 2 years ago
@camoz I'm not affiliated with the project (yet), but it might be to generate more human-readable snapshot "names" (the string in the snapshot filename). The filename of your sub-volume can (and probably will be) descriptive of the content, resulting in its snapshots having that property too. I would also imagine that btrbk
doesn't have as easy access to the sub-volume name when all it's told is "/".
You may not be aware of btrfs
's ability to mount sub-volumes as if they were the root of the filesystem, which makes using a sub-volume for the main content very easy to manage.
It's less of a technical restriction (btrfs should be able to cope with that), here's some reasons that come into my mind:
/mnt/snapshots/rootfs.20220101
on the receiving side. In my opinion this is wrong (have not checked, I believe this is still the case and will ever be), but it's how btrfs does it.onchange
would be: creating a snapshot within the root filesystem should (in my logic) alter the root filesystem, making onchange
obsolete. Somehow it is not the case, somehow creating a snapshot does not increase the generation (transid). Needs more testing...I do not want to give an exhaustive explanation in this part of the README. But you are right, if I'm recommending something I should probably say why somewhere. Gladly taking suggestions, will think of it again later (and probably do some tests on how btrfs behaves exactly).
Ah, I think I have not correctly described what I mean...
I was talking about a btrfs layout where /mnt/snapshots
is not a nested subvolume below /
, like this:
subvolume mountpoint
----------------------------------------
id=5 /mnt/btrfsvol
+-@snapshots /mnt/snapshots
+-@ /
+-@home /home
With a setup like this, is there still a (great) difference between using subvolid=5
and using the (non-nested) /mnt/snapshots
for backing up the root subvolume? I assume no...
UPDATE: Had installed via Debian (on bullseye) so was running an older version. Updated to 0.32 (using the bookworm repository) and was able torun using my subvolume/mount setup. Apologies for the uninformed post below and thanks for the great project.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
If I understand the point @camoz is trying to make, then I agree with it. I similarly have a subvolume "@" that is mounted as my root filesystem and a separate subvolume "@snapshots" mounted elsewhere (in my case it's not /mnt/snapshots, but that hardly matters). It seems like it would be much more convenient to be able to invoke btrbk by setting those two locations as the subvolume and snapshot_dir parameters (respectively) in btrbk.conf rather than needing to separately mount subvolid=5 someplace.
The README states:
I assume "root filesystem /" here refers to the OS root, not the top-level subvolume.
Why is it recommended to do that? I.e., why is it recommended against doing: