20

I've seen some tools that do things like take snapshots periodically and ones that add snapshots to grub, but not this specifically. Does something exist?

This will probably be on EndeavourOS, not Arch directly, if it matters.

top 15 comments
sorted by: hot top controversial new old
[-] folkrav@lemmy.ca 17 points 1 week ago

You can run scripts before/after pacman commands using hooks

https://wiki.archlinux.org/title/Pacman#Hooks

[-] h4x0r@lemmy.dbzer0.com 8 points 1 week ago* (last edited 1 week ago)

alias upgrayedd='<snapshot cmd> && pacman/paru ...'

OR

upgrayedd() {
    <pre>
    <snapshot cmd>
    pacman/paru "$1"
    <post>
}
[-] Hellmo_Luciferrari@lemm.ee 5 points 1 week ago
[-] revanite@lemm.ee 3 points 1 week ago

This is what I use, I am on endeavouros too.

[-] ada 3 points 1 week ago

I don't know the details, but CachyOS uses a pacman hook to do exactly that, so it's possible. It looks like there are AUR packages to do the same thing, but I haven't looked at them

[-] JackbyDev@programming.dev 2 points 1 week ago

Does it do this out of the box? CachyOS is another option on my radar and that might push it over the edge for me over EOS.

[-] ada 2 points 1 week ago

Yep, as long as you use btrfs during the install and select snapper support

[-] JackbyDev@programming.dev 1 points 1 week ago

Just installed CachyOS and chose btrfs when installing, but it never asked about snapper. Maybe I need to do it manually.

[-] ada 2 points 1 week ago

If you open cachy hello, you'll see an option to install snapper support there. I should also add, you need to use grub for the boot images to work when you do a kernel upgrade

[-] JackbyDev@programming.dev 1 points 1 week ago

Awesome! I installed it. Hopefully if something goes wrong I should be good. And yes, I used Grub!

[-] ada 1 points 1 week ago

You can always test it by booting off a backup image. If it works, you have peace of mind, and you can just reboot again from the correct image

[-] fedev@lemmy.world 2 points 1 week ago

I use snapper. It takes snapshots not only triggered by pacman hooks but also on an interval or manually.

https://wiki.archlinux.org/title/Snapper

[-] giacomo@lemm.ee 2 points 1 week ago

manjaro does this with timeshift. i think opensuse does as well.

[-] Strit@lemmy.linuxuserspace.show 2 points 1 week ago

The AUR package btrfs-autosnap does this. You define which subvolumes need to be snapshotted and how many it should keep of each. It adds a pacman hook that then takes a snapshot before updating.

[-] jul@discuss.tchncs.de 1 points 1 week ago

I'm also on EndeavourOS and used this tutorial to do exactly that.

All you should have to do is

yay -S snapper-support btrfs-assistant

this post was submitted on 14 Jan 2025
20 points (100.0% liked)

Arch Linux

7971 readers
1 users here now

The beloved lightweight distro

founded 5 years ago
MODERATORS