Added BTRFS snap hook

This commit is contained in:
root 2022-01-31 00:43:46 -05:00
parent 3a6cf07ba5
commit d3f97ef2d5

14
00-autosnap-btrfs.hook Normal file
View File

@ -0,0 +1,14 @@
[Trigger]
Type=Package
Operation=Install
Operation=Upgrade
Operation=Remove
Target=*
[Action]
Description=Making BTRFS snapshot...
Depends=btrfs-progs
When=PreTransaction
Exec=/usr/bin/sh -c "/usr/bin/btrfs subvolume snapshot / /snaps/root@$(date +%Y-%m-%d_%H-%M-%S)_pacman_pre"
AbortOnFail
NeedsTargets