wesbarnett / snap-pac

Pacman hooks that use snapper to create pre/post btrfs snapshots like openSUSE's YaST
GNU General Public License v2.0
180 stars 14 forks source link

Add pacman hook for /boot #28

Closed felixsinger closed 5 years ago

felixsinger commented 5 years ago

The snap-pac script seems to do snapshots for the root partition only. I think the related lines are https://github.com/wesbarnett/snap-pac/blob/master/scripts/snap-pac#L101 and https://github.com/wesbarnett/snap-pac/blob/master/scripts/snap-pac#L110.

In my case I have a dedicated /boot partition with btrfs, because I have a crypted root partition and I want to unlock it remotely. That's why /boot needs to be outside from my root partition.

Since on /boot there is stored only the kernel and not much more, creating snapshots for /boot before/after every pacman action makes no sense to me. My suggestion is to add another pacman hook for linux and linux-lts, and maybe ucode-intel.

wesbarnett commented 5 years ago

You can solve this by creating a snapper configuration for your /boot subvolume and then a snap-pac configuration that corresponds with it. The manpage for snap-pac contains information on how to do this for snap-pac. Essentially you would have a file named /etc/snap-pac/boot.conf where boot is the name of the snapper configuration. You need to at least have SNAPSHOT=yes in the file.

wesbarnett commented 5 years ago

But you must also create a snapper configuration since snap-pac calls snapper.

wesbarnett commented 5 years ago

Closing due to inactivity.