Using btrfs-assistant as DE learning tool

Now sure how to do this so I’ve been experimenting. On a VM I installed a base no desktop system. Without a DE I can’t run btrfs-assistant so I installed snapper and did a manually configuration of the 2 configs, root and home.

I took a snapper snapshot of both home and root, and then install xfce4 to play with. At that point I could install btrfs-assistant and use it to take addition snapshots as I added things.

So my test is how to get back to no DE installed via my manually snapshots taken earlier. I could use btrfs-assistant to do this and that worked and created top level subvolumes snapshots of root and home prior to doing the restore.

So the reboot put me back to no DE and no btrfs-assistant.

What would be the proper way to return to the system prior to the restore using the backups that btrfs-assistant created before the restore??

I’ve tried several ways, all of which were less than satifactory

There are several ways. One way would be to boot off a live ISO and install snapper and btrfs assistant, mount your btrfs partition and do the restore that way. Of course, if you are not using the default snapper subvols, you will also need a config file created on the ISO.

I just tried booting off the EOS ISO and then
sudo pacman -S snapper failed. I tired updating the mirrors, but pacman seems to have tried a bunch of mirrors and failed with a 404 on each one.

I must be missing something.

From the ISO, you need to use sudo pacman -Sy snapper

However, that ISO is pretty old at this point. The newest snapper might not run with the older libraries on that ISO. If that is the case, instead of using pacman to install snapper, Try using downgrade and pick of version of the approximate age of the ISO.

Alternatively, you don’t need to do that from an EOS ISO. If some other Arch-based distro has a newer ISO, you could use that. For example, I think the Garuda ISO has snapper pre-installed.

Thanks, but this is getting overly complicated. I was looking for a quick way to backup to a point with a restore and save a complete reinstall. However, I think the complete reinstall doesn’t look that bad right now. Might be different if this was a production system and I desperately needed to recover. But my production stuff is all on a NAS server that is also backed up to the cloud. So I can reinstall my PC from an ISO and connect to the NAS and be back in no time.

So I need to get at least a DE so btrfs-assistant will run. I do that most of the time even on a production system. I snapshot at every step of installing and configuring features.

1 Like

You don’t need a full DE. Btrfs Assistant can restore from the command line. You just needs to have snapper and btrfs-assistant installed.

1 Like

Excellent!. I just booted up my system that had been restored to a non-DE snapshot. I installed btrfs-assistant with yay and then used sudo btrfs-assistant --list and --restore 3.

Is there anyway of examining the snapshot information to find the description btrfs-assistant created? I did find that snapper list seems to show that the same as btrfs-assistant GUI does.
However, the index numbers that btrfs-assistant showed for root agreed with snapper, the btrfs-assistant list for home had different numbers.

i.e. btrfs-assistant command line showed 3 snapshots for root and 3 for home. The index numbers shows #1, 2, and 3 for root and 4, 5, and 6 for home. snapper command line show 1, 2, and 3 for both root and home.

This does seem work a lot better than booting an ISO. I could just install snapper and btrfs-assistant before I take my first non-DE snapshots with snapper.

Unless there is an easier way I found that I could mount /dev/vda2 /mnt and look at the subvolumes. under @/.snapshot/N/info.xml shows those description.

Okay thanks for the help with this. I now have a solution. Here’s a little documentation for those playing along at home.

I start with a simple install of EOS with no desktop using no swap and btrfs file system.

After the first boot I install some packages and configure zram swap.

Next I use yay to install snapper and btrfs-assistant.

I configure snapper for both root and home.

sudo snapper -c root create-config /
sudo snapper -c home create-config /home

I edit those config files per the wiki to get the permissions right and the number of snapshots to keep.

sudo nano /etc/snapper/configs/root
sudo nano /etc/snapper/configs/home

Then I take a snapshot of each config so I’ll have a non DE snapshot to restore to later.

sudo snapper -c root create --description "before DE install"
sudo snapper -c home create --description "before DE install"

You can list the snapshots with:

sudo snapper -c root list
sudo snapper -c home list

Or you can use btrfs-assistant

sudo btrfs-assistant --list

You can restore a snapshot with btrfs-assistant by using the --restore option.

Also you can automate snapper with:

sudo systemctl enable snapper-timeline.timer
sudo systemctl enable snapper-cleanup.timer

I then go on to install a DE or Window Manager like Hyprland. At some point I use btrfs-assistant gui to take snapshots. I also can restore using the btrfs-assistant gui my before DE snapshot and start fresh on another line of testing. I can also restore to one of the other DE snapshots from earlier testing.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.