snapper(8)
snapper is a command-line tool for creating and managing LVM snapshots and Btrfs subvolume snapshots for system backup and recovery.
Synopsis
snapper [OPTION]... COMMAND [COMMAND_OPTION]...Description
snapper creates, lists, and manages snapshots of filesystems, primarily for system recovery and backup purposes. It works with both LVM logical volumes and Btrfs filesystems, allowing you to capture the state of your system at specific points in time and restore from them if needed.
Snapshots can be created manually or automatically before system updates. snapper tracks changes between snapshots and can generate detailed reports of what files were modified, added, or deleted, making it useful for auditing and troubleshooting.
Common options
| Flag | What it does |
|---|---|
-c, --config | Use specified configuration (default: root); configs are defined in /etc/snapper/configs/ |
-v, --verbose | Print detailed information about operations |
-q, --quiet | Suppress normal output; only show errors |
-t, --table-style | Choose output format (table, json, csv); default is table |
--utc | Display times in UTC instead of local time |
-a, --all-configs | Operate on all available configurations |
Examples
Display all snapshots in the root configuration
snapper listCreate a snapshot of the root filesystem with a custom description
snapper -c root create --description 'Before system upgrade'Show files changed between snapshot 10 and snapshot 15
snapper status 10..15Display detailed differences (diffs) of all changed files between snapshots
snapper diff 10 15 | lessRevert all file changes made between snapshots 10 and 15
snapper undochange 10..15Remove snapshot number 5 to free up disk space
snapper delete 5List all snapshots in JSON format for parsing by scripts
snapper -t json listMount snapshot 3 to browse its contents without affecting live system
snapper mount 3