Snapper: I don't understand

I’m on a laptop with a fairly small ssd, and “I’m willing to dedicate” 64gb to / with btrfs. I’ve been looking into the snapper with: https://en.opensuse.org/openSUSE:Snapper_Tutorial + the archwiki and I still don’t understand.

  1. How do I setup so that the snapshots are only taken before the tw upgrade (zypper dup)?
  2. I would only keep a couple of snapshots for rollback. How to I trim the snapshots?

Thanks

Hi
This will help more: System recovery and snapshot management with Snapper | Reference | openSUSE Leap 15.5

Specifically this part: System recovery and snapshot management with Snapper | Reference | openSUSE Leap 15.5 on where to configure the amount of snapshots kept. With 64GB you should be fine.

Make your life easier by going with the default of using the entire drive for the installation (ie. don’t use a separate home). Then you won’t have to worry about space for snapshots and you won’t waste unused “dedicated” space.

Also, the default install doesn’t retain a lot of snapshots so you could just stick with it. Plus, the cleanup of snapshots is done automatically.

View snapshots as “diffs”, they don’t use a lot of disk space on their own.

Great advice:

Monitored btrfs from 2016 to 2019. Switched system partition to btrfs and continued monitoring. Switched to default partitioning in 2020-05-17. No issues since two years:

[FONT=monospace]**erlangen:~ #** fdisk -l /dev/nvme0n1 
**Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors**
Disk model: Samsung SSD 950 PRO 512GB                
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: gpt 
Disk identifier: A84F222E-0177-499B-A7EA-BDA6F31E2196 

**Device        **** Start****       End****   Sectors****  Size****Type**
/dev/nvme0n1p1   2048     206847     204800   100M EFI System 
/dev/nvme0n1p2 206848 1000214527 1000007680 476.8G Linux filesystem 
**erlangen:~ #**[/FONT]
**erlangen:~ #** btrfs subvolume list -t / 
ID      gen     top level       path 
--      ---     ---------       ---- 
256     308742  5               @ 
257     325165  256             @/var 
258     324603  256             @/usr/local 
259     310625  256             @/tmp 
260     319346  256             @/srv 
261     324626  256             @/root 
262     324233  256             @/opt 
263     322415  256             @/boot/grub2/x86_64-efi 
264     294985  256             @/boot/grub2/i386-pc 
265     324183  256             @/.snapshots 
**2131    325165  256             @/home **
2546    325159  265             @/.snapshots/1777/snapshot 
2675    324205  265             @/.snapshots/1892/snapshot 
2676    324205  265             @/.snapshots/1893/snapshot 
2677    324205  265             @/.snapshots/1894/snapshot 
2678    324205  265             @/.snapshots/1895/snapshot 
2679    324205  265             @/.snapshots/1896/snapshot 
2680    324205  265             @/.snapshots/1897/snapshot 
2681    324205  265             @/.snapshots/1898/snapshot 
2682    324205  265             @/.snapshots/1899/snapshot 
2683    324205  265             @/.snapshots/1900/snapshot 
2684    324205  265             @/.snapshots/1901/snapshot 
2685    324205  265             @/.snapshots/1902/snapshot 
2686    324205  265             @/.snapshots/1903/snapshot 
2687    324205  265             @/.snapshots/1904/snapshot 
2688    324205  265             @/.snapshots/1905/snapshot 
2689    324205  265             @/.snapshots/1906/snapshot 
2690    324205  265             @/.snapshots/1907/snapshot 
2691    324205  265             @/.snapshots/1908/snapshot 
2692    324205  265             @/.snapshots/1909/snapshot 
2693    324205  265             @/.snapshots/1910/snapshot 
2694    324205  265             @/.snapshots/1911/snapshot 
2695    324205  265             @/.snapshots/1912/snapshot 
2696    324205  265             @/.snapshots/1913/snapshot 
**erlangen:~ #** 

Thank you, I bookmarked it