Btrfs Assistant 1.0 is coming, testers needed

In my testing you don’t need that for it function. It just whines about it in the logs if you don’t have it.

That was last year I did that testing so I can’t say if it still holds true.

I wrote a customized version that works more safely and consistently.

1 Like

hm, last time my snapshots folder was nested, I had to create a different grub-btrfs.path, to instead of monitoring the folder, to execute at the first minute each hour, but I don’t know how that would work with snap-pac…
There was other script in a thread here, let me search

Edit: https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/134

This is all you really need for snapper:

[Unit]
Description=Monitors for new snapshots

[Path]
PathModified=/.snapshots

[Install]
WantedBy=multi-user.target
2 Likes

I’m confused by this because i have pamac-aur-git installed and it updates automatically? What’s the difference?

pamac-aur-git isn’t managed like most *-git packages. The maintainer bumps it manually.

1 Like

michael@eos-22 ~]$ systemctl status grub-btrfs.path
○ grub-btrfs.path - Monitors for new snapshots
Loaded: loaded (/usr/lib/systemd/system/grub-btrfs.path; enabled; vendor preset: disabled)
Active: inactive (dead)
Triggers: ● grub-btrfs.service

michael@eos-22 ~]$ systemctl cat grub-btrfs.path

/usr/lib/systemd/system/grub-btrfs.path

[Unit]
Description=Monitors for new snapshots
DefaultDependencies=no
Requires=\x2esnapshots.mount
After=\x2esnapshots.mount
BindsTo=\x2esnapshots.mount

[Path]
PathModified=/.snapshots

[Install]
WantedBy=\x2esnapshots.mount

As a side note I just installed a package and it seems the snapshot is being generated.

extra/gnome-tweaks 40.10-1 40.10-1 0.00 MiB

Total Installed Size: 1.17 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [--------------------------------------------] 100%
(1/1) checking package integrity [--------------------------------------------] 100%
(1/1) loading package files [--------------------------------------------] 100%
(1/1) checking for file conflicts [--------------------------------------------] 100%
:: Running pre-transaction hooks…
(1/1) Performing snapper pre snapshots for the following configurations…
==> root: 7
:: Processing package changes…
(1/1) reinstalling gnome-tweaks [--------------------------------------------] 100%
:: Running post-transaction hooks…
(1/6) Arming ConditionNeedsUpdate…
(2/6) Compiling GSettings XML schema files…
(3/6) Updating icon theme caches…
(4/6) Checking which packages need to be rebuilt
(5/6) Updating the desktop file MIME type cache…
(6/6) Performing snapper post snapshots for the following configurations…
==> root: 8

Create a file with the following contents at /etc/systemd/system/grub-btrfs.path

[Unit]
Description=Monitors for new snapshots

[Path]
PathModified=/.snapshots

[Install]
WantedBy=multi-user.target

Then type

sudo systemctl daemon-reload
sudo systemctl reenable --now grub-btrfs.path

It created #9 pre snapshpt and #10 post snapshot, but it’s not appearing on the grub menu on reboot.
This is lts kernel, I will try the default kernel just in case.

It isn’t the kernel. Try what I recommended in the post right above yours.

I did. This is exactly what I did:

and checked BTRFS Assistant under Snapper tab as below:

Then I rebooted in LTS kernel (which is what I used since this fresh install). The snapshot menu was still not appearing in the grub menu.

I did not make more than one change at a time, as has been my training as technician for over 40 years. So after the previous attempt did not improve the situation, I rebooted into the default kernel. It still did not appear in the grub menu.

So I rebooted (without making any other changes) except return to the LTS kernel. All 11 snapshots (magically) appeared in the grub menu. I am sure there is an explanation for it, but I suspect the switching of the kernels had something to do with it, since that was the ONLY change made.

Would you like me mark it as a solution?
Thanks.

Those changes won’t make it appear instantly. They appear once you take a snapshot after making those changes.

So what likely happened is that sometime after that either you manually took a snapshot or a snapshot was taken by snap-pac or a timeline snapshot which made the menu regenerate.

I still believe quite strongly it wasn’t caused by your kernel switch.

Well since this is my topic about announcing testing for the 1.0 version I doubt you can mark it as solved. :wink:

Sorry for that. It’s been a long week. I will oen a new thread next time.

1 Like

No big deal. As long as it is working for you now. That is what matters.

1 Like

I tried the instructions in this archwiki article.
https://wiki.archlinux.org/title/Snapper#Configuration_of_snapper_and_mount_point
Now I can take snapshots but can’t seem to restore them.
image
image
Am I doing something wrong? What is the best way to fix this?

btrfs subvolume list /
ID 256 gen 80 top level 5 path @
ID 257 gen 80 top level 5 path @home
ID 258 gen 73 top level 5 path @snapshots
ID 259 gen 80 top level 5 path @log
ID 260 gen 79 top level 5 path @cache
ID 262 gen 61 top level 258 path @snapshots/1/snapshot
ID 263 gen 67 top level 258 path @snapshots/2/snapshot
ID 264 gen 72 top level 258 path @snapshots/3/snapshot

It is because you created a manual subvolume and mounted it at /.snapshots instead of letting snapper create one on it’s own as it does by default.

When you do that, Btrfs Assistant has no way of knowing where to restore the snapshot to.

However, it does support your configuration if you add an entry for it in /etc/btrfs-assistant.conf. This tells it that it should restore the snapshots in @snapshots to @. In fact, the sample entry covers this situation exactly so you should be able to simply uncomment it and change the UUID to match the UUID of the btrfs filesystem.

As a side note, when using Btrfs Assistant you don’t have to do any of that stuff. You can just open up Btrfs Assistant and create the configs right in the GUI.

3 Likes

Thanks a lot, this solved the issue.

1 Like

BTW…Are you using Btrfs Assistant on arm? Just curious because I have never tested it on arm. If it works I can probably change the Arch in the PKGBUILD.

1 Like

Yup, it is on the Raspberry Pi. It gives me a warning when building that it is not for the architecture but it builds.

4 Likes

One issue was that after restoring the snapshot, the older snapshots became invisible in the normal mode like this. This made me follow the Archwiki guide.

Edit:
Is it possible to get a dark theme. I am on the budgie desktop and most other apps follow the dark theme. I even configured qt5ct and kvantum

Is that after rebooting? If so, I would need to see some data from your system when it is in that state.

The application runs as root so you need to configure root’s theme.