You are not logged in.

#1 2022-11-08 03:43:08

carryingweight
Member
Registered: 2022-09-18
Posts: 12

Looking for solution to faulty wiki pacman hook

I am trying to implement root snapshots on my ext4 on LVM system as a way to protect it during system upgrades. As I was struggling to backup boot at the same time I found this pacman hook on the Arch wiki https://wiki.archlinux.org/title/System … _partition, however because it has PostTransaction set, it backs up boot after the system has upgraded, defeating the point of doing so. I tried PreTransaction thinking that would solve the issue, however it strangely only backs up certain parts of boot, everything but the initramfs .imgs and vmlinuz, which are all obviously needed in the backup. I am very new to Arch so I don't really have any idea how to fix this, and I wanted to bring to light the faulty hook on the wiki so that it can be changed.
Thank you in advance!

Offline

#2 2022-11-08 04:18:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Looking for solution to faulty wiki pacman hook

Have you tried running the rsync command by hand to see what it does? You could also add --log-file=<some-log-file> to get a record.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-11-08 04:26:46

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: Looking for solution to faulty wiki pacman hook

Second cfr's suggestion, specifically look in rsync's man page to see exactly what the `--delete` flag does.


"the wind-blown way, wanna win? don't play"

Offline

#4 2022-11-08 04:44:04

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Looking for solution to faulty wiki pacman hook

For what it's worth, I tested the rsync command

rsync -a --delete /boot /tmp/.bootbackup

and it copied everything. --delete will just delete files in /tmp/.bootbackup which no longer exist in /boot.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2022-11-08 08:08:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,442

Re: Looking for solution to faulty wiki pacman hook

everything but the initramfs .imgs and vmlinuz

Those are removed during the installation by a hook and 95-bootbackup.hook fires at the very end.
Make it "10-bootbackup.hook"

Offline

Board footer

Powered by FluxBB