How do i install something like snapshot or timeshift

when installing something or updating it was suppose to do make a snapshot. maybe it does something in the background but it doesn’t show in snapper list of snapshots. to be frank it is not a big problem for me, but im curious…

I’m not sure if you are using Snapper with Btrfs-assistent or Timeshift, there is a package in the AUR for autosnapshots during updates but that’s a package that works for Timeshift.

aur/timeshift-autosnap 0.9-1 (+51 1.87%)
Timeshift auto-snapshot script which runs before package upgrade using Pacman hook.

If you are using Snapper with Btrfs-assistent you should be more than fine just to use Timeline snapshots.

Did you install snap-pac ?

Snapper
snap-pac
grub-btrfs
btrfs assistant
i installed all of the above…

Can you share the output of:

sudo snapper -c root list
sudo snapper list-configs

[enio@enioentity ~]$ sudo snapper -c root list
[sudo] password for enio:
The config ‘root’ does not exist. Likely snapper is not configured.
See ‘man snapper’ for further instructions.
[enio@enioentity ~]$ sudo snapper list-configs
Config | Subvolume
-------±---------
enio1 | /
[enio@enioentity ~]$

By default, snap-pac expects the / config to be named “root”. If you use something different, you need to add a config for it in /etc/snap-pac.ini

1 Like

ah, was not aware of that. deleted old config and made new one named root… tested it, works now… thank you for your help. one more thing if you happen to know, what is the command to enable grub btrfs so i can see snapshot option in grub when booting the os? is this the command?
sudo systemctl enable --now grub-btrfsd (or some other command, i found this online).

That looks correct to me.

1 Like

thank you kind sir, i learned something new today…

1 Like

eh, well i tried the command and it said it created some symlinks, but when i restart, still no snapshot in bios grub.

Try running sudo grub-mkconfig -o /boot/boot/grub.cfg

If that works and displays the snapshots we know it is the service that is the issue.

@enioentity
I use btrfs with grub and install btrfs-assistant, snapper-support and btrfsmaintenance.

[enio@enioentity ~]$ sudo grub-mkconfig -o /boot/boot/grub.cfg
[sudo] password for enio:
/usr/bin/grub-mkconfig: line 270: /boot/boot/grub.cfg.new: No such file or directory
[enio@enioentity ~]$

[enio@enioentity ~]$ yay snapper-support
1 aur/snapper-support 1.1.2-2 (+5 0.09)
Support package for enabling Snapper with snap-pac and grub-btrfs support
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
AUR Explicit (1): snapper-support-1.1.2-2
:: (1/1) Downloaded PKGBUILD: snapper-support
1 snapper-support (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
1 snapper-support (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
==> Making package: snapper-support 1.1.2-2 (ponedjeljak, 31. srpnja 2023. 23:42:25 CEST)
==> Retrieving sources…
→ Found snapper-template
→ Found grub-btrfs-snapper.path
→ Found grub-btrfs-snapper.service
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums…
snapper-template … Passed
grub-btrfs-snapper.path … Passed
grub-btrfs-snapper.service … Passed
:: (1/1) Parsing SRCINFO: snapper-support
==> Making package: snapper-support 1.1.2-2 (ponedjeljak, 31. srpnja 2023. 23:42:26 CEST)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving sources…
→ Found snapper-template
→ Found grub-btrfs-snapper.path
→ Found grub-btrfs-snapper.service
==> Validating source files with sha256sums…
snapper-template … Passed
grub-btrfs-snapper.path … Passed
grub-btrfs-snapper.service … Passed
==> Removing existing $srcdir/ directory…
==> Extracting sources…
==> Sources are ready.
==> Making package: snapper-support 1.1.2-2 (ponedjeljak, 31. srpnja 2023. 23:42:28 CEST)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> WARNING: Using existing $srcdir/ tree
==> Entering fakeroot environment…
==> Starting package()…
==> Tidying install…
→ Removing libtool files…
→ Purging unwanted files…
→ Removing static library files…
→ Stripping unneeded symbols from binaries and libraries…
→ Compressing man and info pages…
==> Checking for packaging issues…
==> Creating package “snapper-support”…
→ Generating .PKGINFO file…
→ Generating .BUILDINFO file…
→ Adding install file…
→ Generating .MTREE file…
→ Compressing package…
==> Leaving fakeroot environment.
==> Finished making: snapper-support 1.1.2-2 (ponedjeljak, 31. srpnja 2023. 23:42:29 CEST)
==> Cleaning up…
loading packages…
resolving dependencies…
looking for conflicting packages…

Package (1) New Version Net Change

snapper-support 1.1.2-2 0,00 MiB

Total Installed Size: 0,00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [--------------------------------------] 100%
(1/1) checking package integrity [--------------------------------------] 100%
(1/1) loading package files [--------------------------------------] 100%
(1/1) checking for file conflicts [--------------------------------------] 100%
:: Running pre-transaction hooks…
(1/1) Performing snapper pre snapshots for the following configurations…
==> root: 14
:: Processing package changes…
(1/1) installing snapper-support [--------------------------------------] 100%
Using default grub snapshot submenu name
Enabling automatic rebuild of grub-btrfs when snapshots are taken
Created symlink /etc/systemd/system/multi-user.target.wants/grub-btrfs-snapper.path → /usr/lib/systemd/system/grub-btrfs-snapper.path.
Creating snapper config for root
Creating config failed (subvolume already covered).
grep: /etc/mkinitcpio.conf: No such file or directory
sed: can’t read /etc/mkinitcpio.conf: No such file or directory
error: command failed to execute correctly
:: Running post-transaction hooks…
(1/3) Reloading system manager configuration…
(2/3) Arming ConditionNeedsUpdate…
(3/3) Performing snapper post snapshots for the following configurations…
==> root: 15
[enio@enioentity ~]$

since those two did nothing i just did restore snapshot to before those two commands(god knows if it did it, i still see those snapper save snapshots that shouldve not be there after restore

Oops. That should be /boot/grub/grub.cfg

Also, don’t install snapper-support on a system that already has snapper configured on it.

i tried, then i clicked restore snapshot before that and rebooted
so hopefully that negated it…

[enio@enioentity ~]$ sudo grub-mkconfig -o /boot/grub/grub.cfg
[sudo] password for enio:
Generating grub configuration file …
Found background: /usr/share/endeavouros/splash.png
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: amd-ucode.img initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: amd-ucode.img initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings …
Detecting snapshots …
Found snapshot: 2023-07-31 23:42:45 | @/.snapshots/15/snapshot | post | snapper-support |
Found snapshot: 2023-07-31 23:42:44 | @/.snapshots/14/snapshot | pre | pacman -U --config /etc/pacman.conf – /home/enio/.cache/yay/snapper-sup |
Found snapshot: 2023-07-31 22:05:33 | @/.snapshots/13/snapshot | post | eos-bash-shared eos-log-tool eos-update-notifier welcome |
Found snapshot: 2023-07-31 22:05:32 | @/.snapshots/12/snapshot | pre | pacman -Sy eos-bash-shared eos-log-tool eos-update-notifier welcome |
Found snapshot: 2023-07-31 21:56:49 | @/.snapshots/11/snapshot | post | optimus-manager-qt |
Found snapshot: 2023-07-31 21:56:49 | @/.snapshots/10/snapshot | pre | pacman -U --config /etc/pacman.conf – /home/enio/.cache/yay/optimus-man |
Found snapshot: 2023-07-31 17:41:54 | @/.snapshots/1/snapshot | single | Manual Snapshot |
Found 7 snapshot(s)

WARNING: ‘grub-mkconfig’ needs to run at least once to generate the snapshots (sub)menu entry in grub the main menu. After that this script can run alone to generate the snapshot entries.

Unmount /tmp/grub-btrfs.K8f7f10UEq … Success
done
[enio@enioentity ~]$

well it shows now. i made one more manual snapshot before restart, and rebooted, and there it is in grub. i can see my snapshots(although not the last one i did manually before reboot, probably will show up later)… i think this could be it…

as you can see i tried something with optimus manager to show gpu switching but that didnt work, i will be bothering myself with that some other day, there is a read at discovery endevour something, apparently it is not so straightforward and easy :laughing:

OK, what does systemctl status grub-btrfsd show?

[enio@enioentity ~]$ systemctl status grub-btrfsd
× grub-btrfsd.service - Regenerate grub-btrfs.cfg
Loaded: loaded (/usr/lib/systemd/system/grub-btrfsd.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Tue 2023-08-01 00:25:48 CEST; 3min 59s ago
Duration: 43ms
Process: 580 ExecStart=/usr/bin/grub-btrfsd --syslog /.snapshots (code=exited, status=1/FAILURE)
Main PID: 580 (code=exited, status=1/FAILURE)
CPU: 7ms

kol 01 00:25:48 enioentity grub-btrfsd[584]: [!] inotifywait was not found, exiting. Is inotify-tools installed?
kol 01 00:25:48 enioentity systemd[1]: grub-btrfsd.service: Main process exited, code=exited, status=1/FAILURE
kol 01 00:25:48 enioentity systemd[1]: grub-btrfsd.service: Failed with result ‘exit-code’.
[enio@enioentity ~]$

jesus, its not looking pretty in this status… rebooted again, still cant see last manual snapshot i created after entering the command and before rebooting