Btrfs Assistant 1.0 is nearly here

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 wishes to try it can install it as btrfs-assistant-git.

Thanks in advance and feedback is welcome!


That browse snapshot addition is massive! Thanks for all the quick updates over the last few days!


Omg I absolutely love the option for being able to restore individual files from a snapshot! Not sure if I'll make use of it but that could be amazing if I only want to for example uninstall a program but not restore other parts of the system that didn't break anything. Definitely looking forward to trying that out.

May I ask though, is this more an alpha build or beta build would you say? I'm happy to try it out and give feedback as long as it isn't very unstable and buggy incase I need to restore an old snapshot when I inevitably do something stupid. And great work! It looks awesome


Not sure what has happened but I installed btrfs-assistant-git and I don't have these new features such as browsing the snapshot etc. Has this definitely been updated? I'll try reinstalling it.

Edit: Rebooted after installing and tried installing through paru as well but I'm not getting these new features such as browsing the snapshots.


Well, I finished writing the code yesterday so I certainly wouldn't call it "production ready". :sweat_smile:

You may need to build it from AUR.

paru -S aur/btrfs-assistant-git

Okay so sounds like alpha maybe haha. I'm sure it'll be okay though as I trust you at this point with your work. And yeah I'll try building it thanks. I'll get back to you soon


paru -S aur/btrfs-assistant-git

This code worked perfectly and now I'm on the latest version of snapper for testing. Thanks! I'll let you know how it goes


Our repo catched up, the version of btrfs-assistant-git is now the latest :slight_smile:


Perfect! And while I remember, thanks for maintaining Linux bore kernel on the chaotic AUR repo. I think it was your name it said as the maintainer at least haha. And btw it's been updated on the AUR whenever you get the chance to update it and any other packages you maintain.

I'm having a little trouble getting started with btrfs-assistant-git. I was able to install fine with sudo pacman -S btrfs-assistant-git, but after reboot the Btrfs Assistant GUI does not launch (it gives the normal polkit-gnome authentication popup, but the program does not launch after authenticating).

Running btrfs-assistant from the terminal gives this error message:

Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/usr/bin/btrfs-assistant: line 22:  1854 Aborted                 (core dumped) btrfs-assistant-bin ${params}

Running with sudo gives a similar but slightly different message:

Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

/usr/bin/btrfs-assistant: line 22:  1930 Aborted                 (core dumped) btrfs-assistant-bin ${params}

I did reinstall as the error message suggested, but it did not yield a different result.

This is a relatively new installation of Sway that is running close to stock.

  Kernel: 5.16.16-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=5fa54f34-b5fc-40be-8092-8ba34ced9eba rw [email protected]
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
  Desktop: sway v: 1.7 info: waybar vt: 1 dm: greetd Distro: Garuda Linux
    base: Arch Linux
  Type: Laptop System: Framework product: Laptop v: AB
    serial: <superuser required>
  Mobo: Framework model: FRANBMCP0B v: AB serial: <superuser required>
    UEFI: INSYDE v: 03.07 date: 12/14/2021
  ID-1: BAT1 charge: 50.7 Wh (92.0%) condition: 55.1/55.0 Wh (100.2%)
    volts: 16.9 min: 15.4 model: NVT Framewo type: Li-ion serial: <filter>
    status: discharging
  Info: model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
    arch: Tiger Lake family: 6 model-id: 0x8C (140) stepping: 1 microcode: 0x9A
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 838 high: 1004 min/max: 400/4700 scaling:
    driver: intel_pstate governor: powersave cores: 1: 759 2: 987 3: 928 4: 732
    5: 782 6: 1004 7: 914 8: 602 bogomips: 44851
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] driver: i915 v: kernel
    ports: active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4 bus-ID: 00:02.0
    chip-ID: 8086:9a49 class-ID: 0300
  Display: wayland server: Xwayland v: 22.1.0 compositor: sway v: 1.7
    driver: gpu: i915 display-ID: 1
  Monitor-1: eDP-1 model: BOE Display 0x095f built: 2019 res: 2256x1504
    hz: 60 dpi: 201 gamma: 1.2 scale: 1.20000004768372
    size: 285x190mm (11.22x7.48") diag: 343mm (13.5") ratio: 3:2
    modes: 2256x1504
  Message: Wayland GBM/EGL data currently not available.
  Device-1: Intel Tiger Lake-LP Smart Sound Audio driver: snd_hda_intel
    v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:a0c8 class-ID: 0403
  Sound Server-1: ALSA v: k5.16.16-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.48 running: yes
  Device-1: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: aa:00.0 chip-ID: 8086:2725
    class-ID: 0280
  IF: wlp170s0 state: up mac: <filter>
  Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-10:3 chip-ID: 8087:0032 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
  Local Storage: total: 931.51 GiB used: 16.6 GiB (1.8%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
    model: WDS100T3X0C-00SJG0 size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 111130WD temp: 40.9 C scheme: GPT
  ID-1: / raw-size: 74.51 GiB size: 74.51 GiB (100.00%)
    used: 16.34 GiB (21.9%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-2: /boot/efi raw-size: 953 MiB size: 951.1 MiB (99.80%)
    used: 257.7 MiB (27.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 74.51 GiB size: 74.51 GiB (100.00%)
    used: 16.34 GiB (21.9%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-4: /var/log raw-size: 74.51 GiB size: 74.51 GiB (100.00%)
    used: 16.34 GiB (21.9%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-5: /var/tmp raw-size: 74.51 GiB size: 74.51 GiB (100.00%)
    used: 16.34 GiB (21.9%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.41 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
  System Temperatures: cpu: 38.8 C mobo: N/A
  Fan Speeds (RPM): N/A
  Processes: 291 Uptime: 15m wakeups: 2841 Memory: 15.41 GiB
  used: 2.41 GiB (15.6%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 Packages: pacman: 1242 lib: 307 Shell: fish v: 3.3.1
  default: Bash v: 5.1.16 running-in: alacritty inxi: 3.3.14
Garuda (2.5.6-2):
  System install date:     2022-03-11
  Last full system update: 2022-03-28
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       No/Undetected
  Snapshots:               Snapper
  Failed units:            dev-nvme0n1p4.swap

I don't think I have tested it under Wayland. I wonder if it is Wayland or Sway specifically.

Hmm, maybe both--Sway is kind of Wayland-only.

Edit: or do you mean it could be something else about Sway breaking it?

It works in Plasma/Wayland. It must be something with Sway.

Probably shouldn't run it like this generally but for testing purposes does sudo -E btrfs-assistant-bin work?

I reinstalled the regular btrfs-assistant and rebooted and it is having the same issue, so at least the git version is not the culprit! :joy: I might have to do a little digging and see if I broke something.

This outputs "sudo: btrfs-assistant-bin: command not found".


That only works with the -git version.

Not a Wayland issue as I'm using Wayland. Specifically the dragonised plasma KDE with Wayland.


It works!

I'm not familiar with "sudo -E". What is the concern you mentioned with running it this way?

-E' The -E (preserve environment) option indicates to the security policy that the user wishes to preserve their existing environment variables. The security policy may return an error if the -E option is specified and the user does not have permission to preserve the environment.

1 Like

OK, well that tells us what direction the problem is.

sudo -E takes the environment from your user and applies it even though the application is being run as root. That means something that sway needs is missing from root's environment when run with sudo or pkexec. If we can figure out what, we can probably fix it.

The reason it is dangerous is that it can sometimes can end up getting files in your home directory owned by root. That being said, I don't think that would be an issue with btrfs-assistant but I haven't tested it.


Let me know if there is anything I can do to help.

1 Like

Can I see the output of env? Maybe something will jump out that we can try setting.

Make sure that doesn't leak any personal info before posting. :sweat_smile: