-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Snapshots
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to system snapshots on Linux, covering Arch Linux, CachyOS, and other distributions including Btrfs snapshots, Timeshift, and snapshot management.
Manual snapshot:
# Create snapshot
sudo btrfs subvolume snapshot / /mnt/snapshots/snapshot-$(date +%Y%m%d)
# List snapshots
sudo btrfs subvolume list /Setup automation:
# Create script
sudo vim /usr/local/bin/btrfs-snapshot.shScript:
#!/bin/bash
SNAPSHOT_DIR="/mnt/snapshots"
sudo btrfs subvolume snapshot / "$SNAPSHOT_DIR/$(date +%Y%m%d-%H%M%S)"Make executable:
sudo chmod +x /usr/local/bin/btrfs-snapshot.shAdd to cron:
# Edit crontab
sudo crontab -e
# Daily snapshot
0 2 * * * /usr/local/bin/btrfs-snapshot.shInstall Timeshift:
# Arch/CachyOS
yay -S timeshift
# Debian/Ubuntu
sudo apt install timeshift
# Fedora
sudo dnf install timeshiftCreate snapshot:
# Create snapshot
sudo timeshift --create
# List snapshots
sudo timeshift --listLaunch GUI:
# Launch GUI
sudo timeshift-gtkList all snapshots:
# Btrfs
sudo btrfs subvolume list /
# Timeshift
sudo timeshift --listRemove snapshot:
# Btrfs
sudo btrfs subvolume delete /mnt/snapshots/snapshot-name
# Timeshift
sudo timeshift --delete --snapshot snapshot-nameRestore:
# Boot from live USB
# Mount root
# Restore snapshot
sudo btrfs subvolume snapshot /mnt/snapshots/snapshot-name /mnt/restoredRestore:
# Boot from live USB
# Launch Timeshift
# Select snapshot
# RestoreCheck snapshots:
# List snapshots
sudo btrfs subvolume list /
# Check space
sudo btrfs filesystem df /mnt/snapshotsThis guide covered snapshots for Arch Linux, CachyOS, and other distributions, including Btrfs snapshots, Timeshift, and restoration.
- Btrfs Guide - Btrfs setup
- Backup and Restore - Backups
- System Recovery - System recovery
- ArchWiki Snapshots: https://wiki.archlinux.org/title/Btrfs#Snapshots
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.