From 5a1df201e7af9c5098648cb5f798abba520ca7c3 Mon Sep 17 00:00:00 2001 From: Daniele Pintore Date: Wed, 9 Jul 2025 09:26:58 +0200 Subject: [PATCH] fix: snapper config --- runs/01-system-setup/04-btrfs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runs/01-system-setup/04-btrfs b/runs/01-system-setup/04-btrfs index c747f3c..0aa266b 100755 --- a/runs/01-system-setup/04-btrfs +++ b/runs/01-system-setup/04-btrfs @@ -11,19 +11,21 @@ if ! sudo snapper -c root get-config &> /dev/null; then # Removes the submodule already created and re-create it from snapper # I can use mount -a since the fstab doens't use subvolume id if ! (sudo umount /.snapshots/ && sudo rmdir /.snapshots/ && sudo snapper --config root create-config / &> /dev/null && sudo mount -a); then - echo -e "\e[31m❌ Error: Snapper create-config failed. Please refer to wiki. Probably the subvolume already exists. Manual intervation needed.\e[0m" >&2 + echo -e "\e[31m❌ Error: Snapper create-config failed. Please refer to wiki. Probably the subvolume already exists. Manual intervation needed. Setup will continue but you have to fix snapper later.\e[0m" >&2 + echo -e "\e[31mPress any key to continue\e[0m" >&2 + read -r exit -1 fi fi # configure snap-pac for snapshots - sudo sed -i "s/^TIMELINE_CREATE=.*/TIMELINE_CREATE=\"no\"/" /etc/snapper/configs/root + sudo sed -i "s/^TIMELINE_CREATE=.*/TIMELINE_CREATE=\"yes\"/" /etc/snapper/configs/root sudo sed -i "s/^TIMELINE_LIMIT_HOURLY=.*/TIMELINE_LIMIT_HOURLY=\"5\"/" /etc/snapper/configs/root sudo sed -i "s/^TIMELINE_LIMIT_DAILY=.*/TIMELINE_LIMIT_DAILY=\"7\"/" /etc/snapper/configs/root sudo sed -i "s/^TIMELINE_LIMIT_WEEKLY=.*/TIMELINE_LIMIT_WEEKLY=\"2\"/" /etc/snapper/configs/root sudo sed -i "s/^TIMELINE_LIMIT_MONTHLY=.*/TIMELINE_LIMIT_MONTHLY=\"5\"/" /etc/snapper/configs/root sudo systemctl enable --now snapper-timeline.timer sudo systemctl enable --now snapper-cleanup.timer - pacman -S snap-pac --noconfirm + sudo pacman -S snap-pac --noconfirm fi