$linuxjunkies
>

snapper(8)

snapper is a command-line tool for creating and managing LVM snapshots and Btrfs subvolume snapshots for system backup and recovery.

UbuntuDebianFedoraArch

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

FlagWhat it does
-c, --configUse specified configuration (default: root); configs are defined in /etc/snapper/configs/
-v, --verbosePrint detailed information about operations
-q, --quietSuppress normal output; only show errors
-t, --table-styleChoose output format (table, json, csv); default is table
--utcDisplay times in UTC instead of local time
-a, --all-configsOperate on all available configurations

Examples

Display all snapshots in the root configuration

snapper list

Create 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..15

Display detailed differences (diffs) of all changed files between snapshots

snapper diff 10 15 | less

Revert all file changes made between snapshots 10 and 15

snapper undochange 10..15

Remove snapshot number 5 to free up disk space

snapper delete 5

List all snapshots in JSON format for parsing by scripts

snapper -t json list

Mount snapshot 3 to browse its contents without affecting live system

snapper mount 3

Related commands