Garuda Assistant Testing - Round 2

It is time to test the next round of Garuda Assistant enhancements. In our last round of testing we got some great feedback that allowed us to make the product better with the support of the community.

What is on tap next? A simple UI for snapper to enable a easy transition to snapper.

Why might someone want to use snapper instead of timeshift?

  • snapper supports taking snapshots of any mounted subvolume, not only @ or @home.
  • snapper allows you to name your snapshots however you like
  • snapper supports both flat and nested subvolume layouts
  • snapper creates read-only snapshots
  • tools have been created for snapper which allow snapshot replication to external hosts/devices to allow snapshots to be used as part of a backup strategy
  • snapper doesn't require the root of the btrfs partition to be mounted

The additions to Garuda Assistant hope to address two of the reasons people may prefer timeshift over snapper.

  • snapper doesn't include a GUI interface(Although there are 3rd party options)
  • snapper doesn't provide an easy way to restore a snapshot

There are also some things that work the same for both solutions

  • They both take snapshots :laughing:
  • They both are supported by grub-btrfs
  • They both have add-ons for taking automatic, manual and scheduled snapshots
  • They both can manage snapshot retention

OK, with the introduction out of the way, here is what the new/updated screens look like:

To try out the new version, you can simply install garuda-assistant-git. Please note the that snapper functionality is all hidden unless snapper is installed.

The next question you might have is how to convert from timeshift to snapper. It is actually fairly simple.

First remove timeshift

sudo pacman -Rc timeshift

Now update and install snapper

sudo pacman -Syu snapper

Create a default config for snapper

sudo snapper create-config /

Next replace the contents of /etc/systemd/system/grub-btrfs.path with the below. You can create it if it doesn't exist already

[Unit]
Description=Monitors for new snapshots
DefaultDependencies=no

[Path]
PathModified=/.snapshots

[Install]
WantedBy=multi-user.target

Make sure it is enabled

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

Finally install snap-pac to automatically take snapshots during pacman operations.

sudo pacman -S snap-pac

From here, you can use Garuda Assistant for the rest.

You should probably enable the snapper-timeline and snapper-cleanup timers on the btrfs tab.

Next you can create configs on the Snapper Settings tab for any other subvolumes you want snapshots for and configure the settings to suit your preferences.

On the Snapper tab you can take manual snapshots and delete snapshots.

Lastly, the btrfs subvolumes tab allows you to restore a snapper snapshot. If you want to restore the snapshot for the root you will need to boot off of a snapshot first.

Notes:

  • Since the snapshots are read-only, you will get some minor errors when you boot off of a snapshot.
  • Please feel free to provide constructive feedback on the usability of the interface.
  • While I tested as thoroughly as I could, there is definitely some risk of breakage, especially when restoring snapshots. Because of this I recommend that you....

Test this version in VM or an install you don't care about!!

22 Likes

really awesome work !!!

I was used to snapper, but have to admit that timeshift does what it needs to do.
Though the snapper readonly and btrfs send | receive to another drive is a huge point to snapper.

Also another plus of snapper: It allows to have root/garuda installation in any kinda of format/place I want: for example, I usually make "@distroname-root and @distroname-boot and @distroname-home" subvolumes instead of "@ and @home".

From the screenshots, the UI looks nice. I will test it on the weekend, after doing backups !

5 Likes
Detecting snapshots ...
Info: Separate boot partition not detected
Info: snapper detected, using config 'root'
Found snapshot: 2021-09-03 13:01:01 | @/.snapshots/9/snapshot | single | timeline
Found snapshot: 2021-09-03 13:00:00 | @/.snapshots/8/snapshot | single | timeline
Found snapshot: 2021-09-03 12:27:59 | @/.snapshots/7/snapshot | post   | libgee libgnomekbd libxklavier timesh
ift vte-common vte3 xapp
Found snapshot: 2021-09-03 12:27:58 | @/.snapshots/6/snapshot | pre    | pacman -Rns timeshift
Found snapshot: 2021-09-03 12:27:16 | @/.snapshots/5/snapshot | post   | libgee libgnomekbd libxklavier timesh
ift vte-common vte3 xapp
Found snapshot: 2021-09-03 12:27:14 | @/.snapshots/4/snapshot | pre    | pacman -S timeshift --overwrite *
Found snapshot: 2021-09-03 12:26:43 | @/.snapshots/3/snapshot | single | boot
Found snapshot: 2021-09-03 12:25:31 | @/.snapshots/2/snapshot | single | Manual Snapshot
Found snapshot: 2021-09-03 12:24:21 | @/.snapshots/1/snapshot | single | snap-pac
Found 9 snapshot(s)
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Seems to work well so far, did the process outlined in the instructions and updated GRUB :thinking:

This is beautiful @dalto :blush:


11 Likes

Hi @dalto
First of all nice work btw
but i think i have found a couple of things that may not be working.

  1. If i create another btfrs drive to place snapshots too.
    I create a new config in the gui and say call it test and select the drive from the dropdown menu.
    I select the new config and create a snapshot, and it is created.
    I check the drive to see if the snapshot has been created and the file has.
    Checking inside the folder it shows the xml file and snapshot file, the snapshot file is empty.
  2. if i update grub all root snapshots are found as expected but any user configs snapshots are not.
  3. In the subvolume no user configs volumes are shown.

Hope this helps

2 Likes

First, thanks for testing again!

I am not sure exactly what you mean but the steps are clear so I will test it this morning.

That it how grub-btrfs works. It is specifically looking for snapshots of the subvolume mounted at /. You can't boot off of a non-root config which is why it doesn't look for them.

I am not sure what you mean? Can you explain or provide a screenshot?

1 Like

Sorry school boy error with that one, I was expecting them to be all on the same sub volume list,or as a total list.
I didnt change the drive :face_with_hand_over_mouth:

3 Likes

Has anyone had the courage to boot off a snapshot and test restoring a snapshot?

I did test it but I would love to see other people try it before we release it.

2 Likes

Yes and it worked as intended :+1:
Edit multible times to test

5 Likes

Well ive managed to break it :face_with_hand_over_mouth:
Now im trying to replicate :smiley:

2 Likes


Has anyone managed to restore a sub-volume.
Also i have tried in a snapshot to restore.
All root snapshots work as expected

1 Like

Basically, you are trying to restore a snapshot of @home but @home is currently mounted as /home so it can't restore it. You would need to unmount before restoring.

In the case of @home that is not the easiest thing to do.

I guess you would need to either temporarily edit /etc/fstab to mount a snapshot of @home or boot off of the ISO.

4 Likes

Thats ok thats kind of what i thought :smiley:
And now ive done abit more testing i see that if i set a user config to say take a snapshot of a sub-volume it creates only a snapshot of that sub-volume. Yet i will have to unmount the sub-volume in terminal and then i can go back to the gui to then restore?
I think if it was possible to add a drop down list of sub-volumes you wish to include in the root snapshot, maybe that would be more usable.

Yes.

I could offer to unmount the subvolume for you but it many cases it will fail because it is in use. Although, it depends on what it is. For example, if you consider the default subvols in a garuda install, @, @home, @log and @tmp would likely be hard to unmount on a running system while @root, @srv and other user created subvols might work.

As a side note, I have no idea why someone would want to take or restore snapshots of @tmp :laughing:

Realistically speaking, I think the only subvols most people would restore in practice are @, @home and user created subvols. :thinking:

I would certainly do it, but since grub-btrfs doesn't support it, I am not sure it would be useful. :nerd_face:

2 Likes

If it helps with things, we might as well change our subvolume layout if needed :thinking:

1 Like

Err...huh?

2 Likes

Oops, wrong word :smiley:

Is it just me, or does snapper take snapshots a lot faster than the timeshift solution? :thinking:

2 Likes

Sorry, it was supposed to be "adapt". I probably should have realized that. Unfortunately, "adopt" also fit contextually so I din't realize it was a typo.

In this case, the subvolume layout isn't the issue. It just isn't that easy to dynamically replace a home directory.

3 Likes

Actually what I want is

Detect if booted from snapper snapshot
If true launch Garuda assistant

In Garuda assistant
Detect if booted from snapper snapshot
If true show only btrfs subvolume tab
And detect from which snapper snapshot we are booted from.

Give a message box on the start about

You are booted from snapshot (number) (description)

Do you want to restore it ?

Yes. No.

Snapshot restored. Please reboot.

Reboot

9 Likes

I just booted into a snapshot and restored it. Worked flawlessly, no complaints. One little thing I noticed though, it was quite hard to get into the snapshot restore window and even harder to find out which one is in fact the one I wanted to restore (all labeled nicely in one tab, in the restore tab they were only listed as numbers though). Possible fixes could be including either of those in the other tab as well to know what is actually being restored.

3 Likes

I am testing the changes @librewish requested above right now. So it will automatically ask you if you want restore the snapshot you are booted into. Even if you say no, it will drop you into the correct tab to restore a snapshot.

I would love to just have the restore button in the snapper tab. The problem is that when you boot off of a snapshot, snapper can no longer see the snapshots since they live under the original subvolume which is no longer mounted at /.

4 Likes