Btrfs Assistant 1.0 is nearly here

That is because /home is probably a different subvolume and so it isn't contained in the snapshot of @. If you also take snapshots of @home, the data would be in there.

4 Likes

I would guess it is one of these.

Can you edit /usr/bin/btrfs-assistant and add this before the call to btrfs-assistant-bin?

export ECORE_EVAS_ENGINE=wayland-egl
export ELM_ENGINE=wayland_egl
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=sway
export XDG_SESSION_CLASS=user
export QT_QPA_PLATFORM=wayland
export WAYLAND_DISPLAY=wayland-1
export DISPLAY=:0

If that works, we can try to narrow it down and see which ones it is specifically.

No dice, I'm afraid. I did reboot. The GUI fails to launch in the same way and the terminal offers the same error message except the line identified in the end changed (probably because we added more lines to that file).

Initial Test Results with new btrfs-assistant-git

EDIT: I'm running Garuda KDE Dr460nized

Hello,

I've been running btrfs-assistant-git and am happy to report great things.

  1.  Created @home config:   SUCCESS
    
  2.  Created Several Snapshots of @home:   SUCCESS
    
  3.  Tested File Restore:   SUCCESS
    
  4.  Tried To Break Things:   FAIL =)
    

Impressive work, @dalto.

I've used snapper that comes setup with opensuse for a year or so and I have to say I like your design much better. The UX & UI you have created is spot on 110%.

I'm sure I can break something for you soon. :wink:

Looking forward to the official release.

Muchos Gracias,
Cannabis

7 Likes

I also like the "restore file from snapshot" function. Did you consider advertising the project a bit, so it becomes more popular? I can imagine that the Folks at OpenSUSE and Fedora, who both use btrfs by default, can find interest in it, and that could cause both more attraction towards your tool, and Geruda as well.

Very well done

4 Likes

I've been poking around a little bit trying to figure out why Btrfs Assistant does not launch in Sway and I stumbled upon this thread, which has an error message similar to what I get if I launch btrfs-assistant from the terminal. The thread got me thinking maybe the issue is related to Qt (as opposed to Wayland).

This takes me a bit beyond my depth knowledge-wise, but I kept digging anyway and I wound up finding another thread here where a person had prepended their command with QT_DEBUG_PLUGINS=1 as a troubleshooting technique to help identify where the problem is occurring.

I gave it a shot (note: hidden output is long):

QT_DEBUG_PLUGINS=1 btrfs-assistant

QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archreq": 0,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/qt/plugins/platforms/libqwayland-generic.so"
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 35: 16481 Aborted                 (core dumped) btrfs-assistant-bin ${params}

A lot of this process is lost on me, but I did notice this piece here at the end (before the error message that is returned as output) is specifying a path which does not exist.

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/usr/lib/qt/plugins/platforms/libqwayland-generic.so"
Failed to create wl_display (No such file or directory)

The other chunks of this debug output are looking at directory paths that do exist, but /usr/bin/platforms does not. At least not on my machine. Should it?

I circled back to the values from env and had another look, since running sudo -E btrfs-assistant still brings up the functioning program. After blindly pasting in a line here or there and testing piecemeal for a while, I ended up dumping the entire output from 'env' into /usr/bin/btrfs-assistant before the call to btrfs-assistant-bin and--predictably enough--sudo btrfs-assistant fired up just fine. From here, I started commenting out lines to try to see where it falls down.

I managed to get it narrowed down to these four lines:

export XDG_RUNTIME_DIR=/run/user/1000
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_QPA_PLATFORM=wayland
export WAYLAND_DISPLAY=wayland-1

It will run without export QT_QPA_PLATFORMTHEME=qt5ct, but it the theming is missing (it has a very Windows 95 look):

Taking out any of the other lines causes it to break.

I'm not sure if this is helpful at all but I figured I would pass along these notes just in case.

5 Likes

Found this thread relating to this, I think... Some Qt applications with 'QT_QPA_PLATFORM=wayland' fail to start / Applications & Desktop Environments / Arch Linux Forums .

Not sure if the workaround is to just pass the environment variables in a custom desktop file for Sway.

According to this Wayland - ArchWiki, in Sway there can be issues.

On some compositors, for example sway, Qt applications running natively might have missing functionality. For example, KeepassXC will be unable to minimize to tray. This can be solved by installing qt5ct and setting QT_QPA_PLATFORMTHEME=qt5ct before running the application.

2 Likes

Hello.
I have upgraded to btrfs-assistant 1.0-1.
But it doesn't work.
Any suggestion to indagate it?

Br.

sudo -E btrfs-assistant
[sudo] password di xxxxx:
Sorry about this, I know it's a bit silly.
[sudo] password di xxxxx:
/usr/bin/btrfs-assistant: riga 22: 15389 Errore di segmentazione (core dump creato) btrfs-assistant-bin ${params}

System:
Kernel: 5.17.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=e1b87af6-67e0-4350-97cb-8bdfe430d209
rw [email protected] quiet
cryptdevice=UUID=735c2a29-e901-4fc7-893a-52a88bf43878:luks-735c2a29-e901-4fc7-893a-52a88bf43878
root=/dev/mapper/luks-735c2a29-e901-4fc7-893a-52a88bf43878 splash rd.udev.log_priority=3
vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1
resume=/dev/mapper/luks-23c04b79-4698-461f-ade3-f485919f86ca loglevel=3
Console: pty pts/1 DM: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: FUJITSU product: LIFEBOOK A544 v: N/A serial: <filter> Chassis: type: 10
serial: <filter>
Mobo: FUJITSU model: FJNBB35 serial: <filter> UEFI: FUJITSU // Phoenix v: Version 1.13
date: 11/18/2013
Battery:
ID-1: BAT0 charge: 0.9 Wh (100.0%) condition: 0.9/4.5 Wh (20.9%) volts: 12.3 min: 10.8
model: PTL CP651527-01 type: Li-ion serial: <filter> status: N/A cycles: 274
CPU:
Info: model: Intel Core i7-4702MQ socket: rPGA988B (On Board) note: check bits: 64 type: MT MCP
arch: Haswell family: 6 model-id: 0x3C (60) stepping: 3 microcode: 0x28
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache: L1: 256 KiB
desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
Speed (MHz): avg: 2186 high: 2195 min/max: 800/3200 base/boost: 2200/2200 scaling:
driver: intel_cpufreq governor: performance volts: 0.7 V ext-clock: 100 MHz cores: 1: 2178
2: 2194 3: 2164 4: 2195 5: 2195 6: 2195 7: 2195 8: 2179 bogomips: 35119
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
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: Retpolines, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Fujitsu driver: i915
v: kernel ports: active: HDMI-A-1 off: eDP-1 empty: VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0416
class-ID: 0300
Device-2: Importek FJ Camera type: USB driver: uvcvideo bus-ID: 1-7:5 chip-ID: 10f1:1a58
class-ID: 0e02
Display: server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.0 compositor: kwin_x11 driver: X:
loaded: modesetting alternate: fbdev,intel,vesa gpu: i915 tty: 110x28
Monitor-1: HDMI-A-1 model: LG (GoldStar) FULL HD built: 2016 res: 1920x1080 dpi: 102
gamma: 1.2 size: 480x270mm (18.9x10.63") diag: 551mm (21.7") ratio: 16:9 modes: max: 1920x1080
min: 720x400
Monitor-2: eDP-1 model: Seiko Epson 0x3642 built: 2012 res: 1366x768 dpi: 101 gamma: 1.2
size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
Message: GL data unavailable in console for root.
Audio:
Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Fujitsu
driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403
Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Fujitsu
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20 class-ID: 0403
Sound Server-1: ALSA v: k5.17.1-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.49 running: yes
Network:
Device-1: Intel Wireless 7260 driver: iwlwifi v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
bus-ID: 03:00.0 chip-ID: 8086:08b1 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Fujitsu
driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 04:00.0
chip-ID: 10ec:8168 class-ID: 0200
IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
IF-ID-2: virbr1 state: down mac: <filter>
Bluetooth:
Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-8:7
chip-ID: 8087:07dc class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 2 state: down bt-service: enabled,running rfk-block:
hardware: no software: yes address: <filter>
Drives:
Local Storage: total: 931.51 GiB used: 80.47 GiB (8.6%)
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 QVO 1TB family: based SSDs
size: 931.51 GiB block-size: physical: 512 B logical: 512 B sata: 3.3 speed: 6.0 Gb/s type: SSD
serial: <filter> rev: 1B6Q temp: 34 C scheme: GPT
SMART: yes state: enabled health: PASSED on: 102d 16h cycles: 764 written: 3.99 TiB
Partition:
ID-1: / raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 80.47 GiB (8.7%) fs: btrfs
block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.45%) used: 682 KiB (0.3%) fs: vfat
block-size: 512 B dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 80.47 GiB (8.7%) fs: btrfs
block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
ID-4: /var/log raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 80.47 GiB (8.7%)
fs: btrfs block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
ID-5: /var/tmp raw-size: 922.45 GiB size: 922.45 GiB (100.00%) used: 80.47 GiB (8.7%)
fs: btrfs block-size: 4096 B dev: /dev/dm-0 maj-min: 254:0
mapped: luks-735c2a29-e901-4fc7-893a-52a88bf43878
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.67 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/dm-1
maj-min: 254:1 mapped: luks-23c04b79-4698-461f-ade3-f485919f86ca
Sensors:
System Temperatures: cpu: 75.0 C pch: 62.5 C mobo: 27.8 C
Fan Speeds (RPM): N/A
Info:
Processes: 292 Uptime: 20m wakeups: 5 Memory: 7.67 GiB used: 3.07 GiB (40.0%) Init: systemd
v: 250 tool: systemctl Compilers: gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1665 lib: 385
Shell: Bash v: 5.1.16 running-in: pty pts/1 inxi: 3.3.14
Garuda (2.5.6-2):
System install date:     2021-03-13
Last full system update: 2022-03-30
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Timeshift
Failed units:

Without it, you will not receive any help from the Garuda team or your topic is likely to be closed without notice.

Before you open a new help request, read relevant sections of the Arch and Garuda wiki.
Thoroughly search your issue and any error messages in the forum and on the web.

Report everything you have already attempted to solve your problem.

There was a bug in 1.0 where it would crash if Snapper wasn't installed. This is fixed in 1. 1 which was just released.

3 Likes

Sorry. What is Snapper?
Do you mean community/snapper 0.9.1-2?

The latest versiont that I have found is
[[email protected] ~]# pacman -Ss btrfs-assistant
chaotic-aur/btrfs-assistant 1.0-1 [installed]
An application for managing BTRFS subvolumes and Snapper snapshots
chaotic-aur/btrfs-assistant-git 0.9.1.r31.g3873821-1
An application for managing BTRFS subvolumes and Snapper snapshots

chaotic-aur probably hasn't built the new package yet. You can build it from AUR if you need it sooner.

paru -S aur/btrfs-assistant
4 Likes

I fixed it. I didn't like to have a broken btrfs-assistant.
btrfs-assistant is a little bit different from the previous ones. I have installed also snapper and I need to make a first basic conf. Where can I find docs (wiki or others)?

Yes, if you scroll to the top of this topic, there is a list of all the changes in this version.

Alternatively, you can read the changelog. 1.0 was a pretty major overhaul.

4 Likes

I just built the updated version on Chaotic - 1.1-1

4 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.

13 Likes

:+1:

That diff viewer/restorer...that could be a game-changer.

6 Likes

Awesome!!! :smile:

Hmm QoL are a huge deal and these changes will improve that. That integrated diff viewer seems impressive! o.o

Thanks for your work/time :slight_smile:

2 Likes

A few pictures of the latest -git version:



The diff feature is definitely very fancy! :grin:

9 Likes

Indeed :smiley:

3 Likes

Ooohhh I can't wait to try this diff viewer. One of the many things I feel I would never use personally but is nice to have and I'm sure of use to people that prefer to restore files instead of an entire snapshot. Could be good for debugging too I guess so you can see what file messed you up and how to sort it for the future!

1 Like