Skip to content

Conversation

@fused0
Copy link

@fused0 fused0 commented Nov 23, 2025

Here's the start of configurable subvolume names, to support non-ubuntu layout (at least layouts that only have different names, not nested ones).

It's functional, but I'm sure some (small?) issues are remaining.

Advice and suggestions appreciated.

See issues #368, #405, #266, etc

Best,
fused0

@ygerlach
Copy link
Contributor

ygerlach commented Nov 23, 2025

Nice! i just ran into this issue today, as i tried to run timeshift on debian in btrfs mode (I had to manually rename @rootfs to @ and fix my grub for it to work)

I think in the long term we should allow an arbitrary amount of subvolumes for backups. I believe some distros allow /boot or /etc to be their own subvolume. But i guess that would be a bigger topic.

I think there is some room to improve add_opt_btrfs_subvolume_names :

  • it seems the code for creating home and root text box is quite similar. maybe we could create a function like create_btrfs_subvolume_selection to de-duplicate this.
  • There should be some kind of guard against entering a wrong subvolume names. Maybe even use a select box instead of a text box
  • the boxes should be hidden or greyed-out when btrfs mode is inactive
  • i think the home subvolume selection could be moved to the thing where it asks to backup @home at all (see screenshot). I am thinking a selection box with the options: "Disabled", @home, @boot, ...)
  • selecting the same subvolume twice should also be guarded against.
grafik

Some other thing: i don't know if we need to care about changes of names in the config. What if i configure @rootfs, make some snapshots, rename it to @ maybe fuck up my system some time later, want to restore my old @rootfs snapshot, but because i changed the name in the timeshift config its now failing.

The question is: should we use the configured btrfs subvolume, or just restore all subvolumes in the snapshot folder or use the information from info.json? Im not sure how it is currently handled. (Enable and Disable backup of @home could have a similar problem)

@fused0
Copy link
Author

fused0 commented Nov 23, 2025

Thanks for the quick review, I'll get to the improvement suggestions soon :)

Regarding:

I am thinking a selection box with the options: "Disabled", @home, @boot, ...)

What would "Disabled" do?

selecting the same subvolume twice should also be guarded against.

Thanks, definitely, that seems like it could fail spectacularly.

@ygerlach
Copy link
Contributor

What would "Disabled" do?

the same as not selecting the checkbox seen in the screenshot. (I would replace the checkbox with the dropdown)

@fused0
Copy link
Author

fused0 commented Nov 23, 2025

I put the option into the backup type page, because it depends on the type of backup used. Selecting rsync is the equivalent of the option being disabled.

To me, it would be a little confusing to have it on the users page, but I'm also not super familiar with the full functionality of this page, because I saw it allows selecting home directories in cases where multiple users exist on the system.

Please let me know what you think.

Also deduplicated the subvolume ui selection code
@fused0
Copy link
Author

fused0 commented Nov 24, 2025

I've turned the subvolume name selection into a combo box, which should address almost all of the issues you had, except the one about the location of the option

Not entirely sure what the common options are (please let me know) and if there should be a "custom" option as well. The custom option would make it tricky in terms of making sure the config is valid.

@fused0
Copy link
Author

fused0 commented Nov 24, 2025

Actually, I went and change the two comboboxes into a single one, to select a predefined layout. Hopefully I left some room to add a "custom" option (implementation would be similiar how the custom date format is done, presumably).

The current state would be more than sufficient for my - and probably most users - needs.

Still not sure about the debian layout/subvolume names.

Also, I'd like to change some of the messages in the UI, but I'm not sure how to proceed in regards to the translation, example:

status_details = _("Select BTRFS system disk with root subvolume" + @" ($(App.root_subvolume_name))");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants