Docs / Backup & Recovery / Snapshot-Based Backups on Linux

Snapshot-Based Backups on Linux

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 31 views · 2 min read

Introduction

Filesystem snapshots capture the exact state of your storage at a point in time. They are nearly instantaneous and provide a consistent backup point, even for databases and active applications.

LVM Snapshots

If your server uses LVM (Logical Volume Manager), you can create snapshots natively:

# Create a snapshot (allocate 5 GB for changes)
sudo lvcreate -L 5G -s -n snap_root /dev/vg0/root

# Mount the snapshot read-only
sudo mkdir /mnt/snapshot
sudo mount -o ro /dev/vg0/snap_root /mnt/snapshot

# Back up from the snapshot
rsync -avz /mnt/snapshot/ /backup/snapshot-$(date +%Y%m%d)/

# Clean up
sudo umount /mnt/snapshot
sudo lvremove -f /dev/vg0/snap_root

Btrfs Snapshots

# Create a read-only snapshot
sudo btrfs subvolume snapshot -r / /snapshots/root-$(date +%Y%m%d)

# List snapshots
sudo btrfs subvolume list /snapshots

# Restore by rolling back
sudo btrfs subvolume delete /
sudo btrfs subvolume snapshot /snapshots/root-20260225 /

ZFS Snapshots

# Create snapshot
sudo zfs snapshot tank/data@backup-$(date +%Y%m%d)

# List snapshots
sudo zfs list -t snapshot

# Rollback
sudo zfs rollback tank/data@backup-20260225

# Send to remote
sudo zfs send tank/data@backup-20260225 | ssh remote-server "sudo zfs receive backup/data"

Best Practices

  • Take snapshots before system updates or major changes
  • Automate snapshot creation and pruning with cron
  • Don't rely solely on snapshots — they're on the same disk as the original data
  • Combine snapshots with offsite rsync for complete protection

Was this article helpful?