Skip to main content
  1. Posts/

Exploring Btrfs Auto-Backups: My Experience on CachyOS

·632 words·3 mins
Nofal Briansah
Author
Nofal Briansah
Holaaa :)

TL;DR
#

Btrfs snapshots are a powerful way to “undo” system changes. On CachyOS, combining Snapper with the Limine bootloader creates a seamless, bootable recovery system for daily rolling-release updates.

Important: Snapshots are for system recovery, not hardware failure protection. Always maintain a separate off-site backup for critical data.


Context
#

I’ve been back in action after a three-month hiatus due to hardware issues with my previous device, which have now been fully resolved.

Since December 2025, I have been daily-driving CachyOS. While I appreciate its performance gains from the BORE scheduler, being on an Arch-based rolling release always brings a tiny bit of anxiety during a sudo pacman -Syu. Hardware edge cases or manual configuration errors are rare but possible.

I needed a “safety net” that didn’t feel like a chore. This led me to explore automated Btrfs snapshots integrated with Limine, the modern bootloader recommended by the CachyOS team.

The Btrfs Foundation
#

Btrfs is a modern Copy-on-Write (COW) filesystem. It excels at snapshots because they take up almost no space initially—only changes made after the snapshot consume additional storage.

CachyOS Optimizations
#

  • Transparent Compression: Ships with ZSTD (Level 3) enabled by default.
  • Subvolume Layout: Uses the @ and @home standard, making snapshot automation straightforward.
  • Efficiency: Snapshots are nearly instantaneous and atomic.

The Bootloader: Limine
#

I chose Limine because it is a lightweight, portable, and multiprotocol bootloader that avoids the complexity of GRUB. It is the default for many modern, performant distributions.

Why Limine for Recovery?
#

The “magic” in CachyOS is limine-snapper-sync. When a snapshot is created, Limine automatically detects it and adds it to the boot menu. If an update breaks your desktop, you can literally reboot into a working state from the bootloader.

Pros:

  • Clean, simple configuration and theming.
  • Native support for UEFI and BIOS.
  • Seamless integration with Snapper.

Cons:

  • Requires /boot to be on a FAT partition.
  • Limited TPM support for measured boot.

Detailed Implementation
#

There are two primary ways to manage this on CachyOS: the GUI method for ease of use, and the CLI method for transparency and control.

Method 1: The GUI (Btrfs Assistant)
#

For those who prefer a visual interface, Btrfs Assistant is a powerful front-end for Snapper.

  1. Open Btrfs Assistant from your application menu.
  2. Navigate to the Snapper Settings tab.
  3. Create a configuration for the root (/) subvolume.
  4. Set your retention policy (e.g., keep 5 hourly, 7 daily).
  5. Enable the Timeline timer.

Method 2: The CLI (Snapper)
#

For more granular control, you can configure everything via the terminal:

# Install required packages
sudo pacman -S snapper grub-btrfs # grub-btrfs is used for generic sync

# Create the initial config for root
sudo snapper -c root create-config /

# Enable the automation services
sudo systemctl enable --now snapper-timeline.timer
sudo systemctl enable --now snapper-cleanup.timer

Configuration Tuning
#

To prevent snapshots from consuming too much space, I keep a lean history in /etc/snapper/configs/root:

  • TIMELINE_LIMIT_HOURLY="5"
  • TIMELINE_LIMIT_DAILY="7"
  • TIMELINE_LIMIT_MONTHLY="0"

Recovery Workflow
#

If a system change breaks the OS:

  1. Reboot the machine.
  2. Select the Snapshots entry in the Limine menu.
  3. Select the most recent working state.
  4. Once the desktop loads, open a terminal and run snapper rollback to make this state permanent.

Note: Snapshots are NOT Backups
#

I must emphasize: Snapshots reside on the same drive.

  • If your SSD dies, your snapshots die too.
  • A True Backup follows the 3-2-1 rule (3 copies, 2 media, 1 off-site).
  • I use snapshots for System Stability, but I use external drives for Data Persistence.

Final Thoughts
#

Automating Btrfs snapshots with Limine on CachyOS hasn’t made my system “invincible,” but it has made it “recoverable.” It provides a low-maintenance insurance policy that lets me experiment with bleeding-edge packages without fear.

References
#

Comments

Feel free to leave a message using Giscus (GitHub account) or use Cusdis (Guest tab) to comment anonymously.