Skip to main content

Snapshot Manager

Project description

Snapm CI License Ask DeepWiki

Snapm

Snapshot manager (snapm) manages named snapshot sets on Linux systems. Each snapshot set captures coordinated snapshots across multiple volumes, representing a consistent point-in-time system state that can be referenced and managed as a single unit.

Features

  • Coordinated snapshot sets: Create coordinated snapshots across multiple volumes
  • Bootable snapshots: Generate boot entries for snapshot boot and failsafe revert
  • Multiple backends: Support for LVM2 (Copy-on-Write and Thin) and Stratis
  • Flexible scheduling: Integration with systemd timers for automated snapshot creation with retention policies
  • Size policies: Flexible snapshot sizing with multiple strategies
  • Plugin architecture: Extensible design for additional storage backends

Quick Start

Installation

From RPM (Fedora/CentOS/RHEL)

Install from distribution repositories (when available):

dnf install snapm boom-boot

Manual Installation

  1. Create and activate a virtual environment:
python3 -m venv --system-site-packages .venv && source .venv/bin/activate
  1. If boom-boot is not installed from your distribution's packages, clone and install it with pip:
git clone https://github.com/snapshotmanager/boom-boot.git
cd boom-boot
python3 -m pip install .
  1. Repeat the process with the snapm repository:
git clone https://github.com/snapshotmanager/snapm.git
cd snapm
python3 -m pip install .

Basic Usage

Create a bootable snapshot set

Create a snapshot set named "before-upgrade" of root and home, with snapshot boot and revert boot entries:

snapm snapset create --bootable --revert before-upgrade / /home

List snapshot sets

snapm snapset list

Show detailed information:

snapm snapset show before-upgrade

Boot into a snapshot

  • Reboot and select the snapshot boot entry from the GRUB menu
  • Entry will be named: "Snapshot before-upgrade YYYY-MM-DD HH:MM:SS (version)"
  • Optionally run grub2-reboot <title> to pre-select snapshot boot entry, e.g.:
grub2-reboot "Snapshot before-upgrade YYYY-MM-DD HH:MM:SS (version)"
  • Use grub-reboot instead of grub2-reboot on Debian and Ubuntu systems.

Revert to snapshot state

snapm snapset revert before-upgrade

Then reboot into the Revert boot entry.

Note: Reverting destroys the snapshot set (snapshots are merged back into the origin volumes).

Clean up

Delete snapshot set when no longer needed:

snapm snapset delete before-upgrade

Common Workflows

System Updates

Before major system updates:

snapm snapset create --bootable --revert pre-update / /var

If update goes wrong, revert:

snapm snapset revert pre-update

When satisfied with update, clean up:

snapm snapset delete pre-update

Development Snapshots

Quick development checkpoint:

snapm snapset create dev-checkpoint /home /var

Continue working...

If needed, revert specific volumes by splitting them into a dedicated snapshot set first:

snapm snapset split dev-checkpoint dev-checkpoint-home /home

Example output:

SnapsetName:      dev-checkpoint-home
Sources:          /home
NrSnapshots:      1
Time:             2025-08-30 12:44:00
UUID:             ee82269f-8c78-5814-b47a-b9be31bcebb5
Status:           Inactive
Autoactivate:     no
Bootable:         no
snapm snapset revert dev-checkpoint-home

Alternatively revert the entire snapshot set:

snapm snapset revert dev-checkpoint

Documentation

Requirements

  • Linux system with LVM2 or Stratis volumes
  • boom-boot
  • Root privileges for performing storage operations
  • Python 3.9+

Supported Storage Backends

Backend Type Snapshots Thin Provisioning Status
LVM2 Copy-on-Write Stable
LVM2 Thin Thin Pools Stable
Stratis Thin Pools Stable

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Support

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Related Projects

  • boom - Boot manager for Linux snapshot boot
  • stratis-cli - Command-line tool for Stratis storage
  • lvm2 - The LVM2 logical volume manager

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapm-0.5.1.tar.gz (120.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapm-0.5.1-py3-none-any.whl (107.7 kB view details)

Uploaded Python 3

File details

Details for the file snapm-0.5.1.tar.gz.

File metadata

  • Download URL: snapm-0.5.1.tar.gz
  • Upload date:
  • Size: 120.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for snapm-0.5.1.tar.gz
Algorithm Hash digest
SHA256 ecf26884f079a09784a73a9e3b366c47768f77d7e2b3e201ac5cc54f036a808d
MD5 0905f6ff73528305c06c624167147f91
BLAKE2b-256 92ded2bf1238a3e54e268e814ac42bab8a0872cb4c16d7b9ba20fcc1b9438101

See more details on using hashes here.

File details

Details for the file snapm-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: snapm-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 107.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for snapm-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24cad11cbc2897cbf2dd78e38d52a5f883ff6302e0024e5151496f5ba0bf0813
MD5 a26da0d0f95ca6ce0c86145ea57829bc
BLAKE2b-256 e651912779e6b67cac6c728c7d12297458284d316bcb0f30fef11b62dc9889da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page