Hello.
I’m trying to create subvols on Btrfs to exclude snap applications from snapshots/recovery, but I’m having problems:
I have already created the subvols on the folders: /snap /var/snap /var/lib/snapd
With these folders created on restore I find all the applications installed even after a restore; snapshot btrfs > snap install telegram-desktop > restore snapshot btrfs
But when I start the application I have this error: error: cannot find installed snap “telegram-desktop” at revision 994: missing file /snap/telegram-desktop/994/meta/snap.yaml
From what I understand why I have not excluded from the snapshot also: /etc/systemd/system/multi-user.target.wants/
But if I exclude this folder too, I have no risk of starting other applications/services that I have previously uninstalled? Am I wrong?
With flatpak it was enough for me to exclude this folder /var/lib/flatpak
My motivation is that I have over 60 snaps installed, and I would like to avoid having to reinstall applications or make many updates if I restore an old snapshot (as I recently had 20.04> 19.10).
Hi, thanks to whoever will answer me.
I still haven’t been able to solve.
Although I know the problem, but perhaps I personally can not do anything.
What I ask, is it technically possible to create a folder on the systemd path where to put all the snap boot files there? for example /etc/systemd/system/snapd/ , for now I’m on /etc/systemd/system/
For me this is a blockage in using snapd. At the moment I solved it by uninstalling snapd in favor of flatpak which allows me easier management with btrfs.
Thanks, I hope that in the future it will improve and that I will be able to use snapd again.
The problem is not only for Btrfs, but there are other use cases, for example on a small partition, maybe a small SSD, and you want to move the APP snap to a separate disk, if you had to reinstall the OS for any reason, you need to reinstall all APP snap.
I tried in VM, an installation of Ubuntu with ZFS, to restore a snapshot, restore and then delete all the APP snap installed after the snapshot.
With flatpak you don’t have these limits.
I hope that sooner or later there will also be a solution for snap.