Btrfs Assistant 1.0 is coming, testers needed

I have been diligently working towards a release of Btrfs Assistant 1.0 and I have reached the point where it is ready for broader testing. There are a bunch of changes this time around:

  • A large refactor of the entire code base including touching almost every section of the code
  • Removed all shell manipulation functions(sed/grep/awk/etc). These functions are now performed in C++
  • Added a snapshot browser to explore your Snapper snapshots
  • Added the abilty to restore individual files from snapshots
  • Added a basic CLI to list and restore snapshots
  • Removed the requirement that .snapshots must be a nested subvolume. If you use non-nested subvolumes for snapshots, you can now specify those in the config
  • Removed the functionality to automatically launch the application when booting off a snapshot
  • Removed the checkboxes to manage Btrfs Maintenance systemd units because they were also being managed by Btrfs Maintenance which caused conflicts
  • Change the sort order of snapshots in restore mode so the most recent snapshots are first
  • There is now a small launcher script that launches the main binary which has been renamed to btrfs-assistant-bin
  • Added snapshot number to snapper restore grid
  • Added the snapshot type info to all snapshot views
  • Added the ability to manually name snapshots
  • Added date to backup subvolume name to make it easier to determine how old the backups were
  • The entire row is now selected when clicking in the grid on the Snapper tab
  • The subvolume list is now relative to the root of the Btrfs partition

Although I tested as thoroughly as I could, the code base has had a massive overhaul so it probably needs more testing that usual.

Anyone who wished to try it can install it from AUR as btrfs-assistant-git.

Thanks in advance and feedback is welcome!

30 Likes

Installed but I’m confused by the above? Is this correct?

Edit: I think you are talking about the check boxes that used to be on the first tab?

1 Like

Yes, that is what it should look like now.

Before, it looked like this:

1 Like

When i check the box to include the timeshift or snapper snapshots it doesn’t stay after closing the btrfs-assistant when i reopen it. Is that normal?

1 Like

Yes. That isn’t intended to be persistent. It hides them by default and allows you to show them if you want to.

2 Likes

That Btrfs maintenance tab is very nice… No need to configure /etc/default/btrfsmaintenance for mountpoints anymore…

Edit: the default for the defrag frequency (timer) part is disabled ?

1 Like

The defaults come from Btrfs Maintenance.

1 Like

Hi @dalto. I did a clean default EOS install with btrfs root partition, Gnome and zramd, nothing else except my applications.

Once Calamares creates the default subvolumes, can I add more so it looks like your screen shots?

I see you have been busy on this project on your git, so I will wait for you to reply before moving further. I want to get it working as closest to your setup, so if I get into problems later, I haven’t got some exotic setup.

After looking at the readme, can you give me some steps to get up and running?

On a personal note, I am convinced BTRFS is the future, given the rate distros are offering it by default, due to its stability, scaleability, reliability, speed, etc. Even the principal developer of ext4 said BTRFS was a better direction. Fedora, Suse and Garuda offer it as default. I became excited about it and wonder why it is not already #1 and why people are still using ext4.

Since making my last hop to EOS, it has been only BTRFS. With grub snapshots it has saved me more times than I care to remember.

Now having BTRFS Assistant to see what is happening under the hood, the file system becomes much more transparent to end users and they will be more likely to use it, as they felt comfortable using that traditional MS Windows restore point concept they came to rely on when (not if) disaster struck.

It is very nice to see you recently added CLI support, so we can learn the terminal commands, staying in line with the ethos EOS, “terminal-centric”.

Anyway, the project is off to a good start, and it is being developed systematically in a measured way, so it may be time to finally create a github account :blush:

1 Like

can you use this on other distros?

There are no requirements listed on the github
The folks at Manjaro, say it works. It should work on any Arch distro with btrfs file system.

I haven’t tested or yet written instructions on how to install it on other distros but it is intended to be distro-agnostic.

It certainly will work on any Arch-based distros using the AUR package.

There are a couple of limitations:

  • If the distro doesn’t use systemd, the checkboxes that control the services won’t work(Because there are no services). I plan to make the application better support distros without systemd in a future release.
  • If the distro doesn’t have polkit, you would need to make some changes to the desktop file but the application should work.

That being said, I believe all the major distros have both systemd and polkit so in most cases it should be fine.

3 Likes

Yes, they can be added at any time. You can also make the installer add them if you want to by editing the config before installing.

That being said, you definitely don’t want to try to match my screenshot. Some of that stuff is just for testing purposes. :wink:

If you want the instructions for a fully functional setup with automatic snapshots and snpahot booting I will try to provide the steps from memory. Hopefully I am not missing any steps.

After installing with btrfs selected as the filesystem:

  • Install snap-pac, snapper, grub-btrfs and btrfs-assistant
  • Open Btrfs Assistant
    • Switch to the “Snapper Settings” tab
    • Click on the “New Config” button
    • Name the config “root” and choose / as the mountpoint
    • Click the “Save Config” button
    • Set the retention limits you want. In particular you probably want to lower the amount of “Number” snapshots that are retained. These are the snapshots that are taken when pacman runs. It takes 2 snapshots in each run so something like 10 is probably a more reasonable number. That will give you 5 pacman runs. The timeline settings are entirely left to your preferences.
    • Select the checkboxes for snapper-timeline and snapper-cleanup and click the “Apply” button to the right of the checkboxes.
  • Add support for booting off read-only snapshots
    • Edit /etc/mkinitcpio.conf and add grub-btrfs-overlayfs to the end of the HOOKS section
    • Rebuild your initrams with sudo mkinitcpio -P
  • Make sure the snapshots are added to the grub menu. There are two easy ways to do this. Only pick one of them
    • Enable the grub-btrfs.path systemd unit
    • Install snap-pac-grub from AUR

I think that is pretty much it. Of course you can also create snapper configs of other subvolumes if you like. For example /home. You just need to create a config for it in the “Snapper Settings” tab. Make sure you enable timeline settings for it as only snapshots of “root” are taken during pacman operations.

3 Likes

Version 1.2 is now available for testing with btrfs-assistant-git.

There are some small quality of life improvements but the big new feature is an integrated diff viewer that allows you to see the changes in a file over time and optionally restore one of the selected versions.

See the changelog for the full list of changes.

2 Likes

Does this not automatically update?

Edit: I just used yay and installed it again.

Edit2: Does yay not see it because i don’t have set look for update packages that are git. I guess that’s only on pamac?

1 Like

You need to use --devel

yay -Syu --devel

So far, so good. Did I do this right.

I ran deleteda package to generate a snapshop

It worked exactly as you said, except the snapshots do not appear in the Grub menu :slightly_frowning_face:

Am I supposed to START these buttons?

I tried that once and then I tried creating a snapshop without hitting those START buttons.

The timeline snapshot is enabled.


Am I doing anythng wrong?
Remember it’s a total cleanskin install Gnome.

Here are my subvols, including Timeshift, which is not even installed.

Should I upgrade to 1.2?

Erm…that means either there is something wrong with the path unit or it wasn’t started when you took the snapshot.

No, those run a scrub and/or balance. They have nothing to do with snapshots.

It all looks good to me.

Is the only issue that grub isn’t getting updated with the list of your snapshots?

Yes.
Are there any other diagnostics to run?

systemctl status grub-btrfs.path
systemctl cat grub-btrfs.path

As far as I remember, you need a mount point for the grub-btrfs.path to work…
systemctl list-units -t mount

  \x2esnapshots.mount                               loaded active mounted /.snapshots