snapper is a command-line utility for managing filesystem snapshots on Linux systems. It is typically used on systems that use the Btrfs or LVM2 filesystems, which support snapshotting natively. However, snapper can also be used with other filesystems, such as ext4 or XFS, by using the LVM thin provisioning feature.
The main purpose of snapper is to make it easy to manage and manipulate filesystem snapshots, which are point-in-time copies of the entire filesystem or individual subvolumes. These snapshots can be used for a variety of purposes, such as backing up important data, rolling back system changes, or creating a sandboxed environment for testing software.
snapper provides a command-line interface for creating, managing, and deleting snapshots. It also includes a number of advanced features, such as support for automatic snapshot creation, snapshot rollback, and integration with various backup and storage systems.
One of the key benefits of snapper is its ability to create and manage snapshots in a way that is transparent to the user. For example, snapper can be configured to automatically create snapshots before and after system updates, so that the system can be easily rolled back if the update causes problems.
Another advantage of snapper is its ability to integrate with other tools and systems. For example, it can be used with backup tools such as rsync or tar to create offsite backups of important data, or with storage systems such as LVM to manage snapshot volumes.
If you encounter the below error while running the command snapper:
snapper: command not found
you may try installing the below package as per your choice of distribution:
|Debian||apt-get install snapper|
|Ubuntu||apt-get install snapper|
|Arch Linux||pacman -S snapper|
|Kali Linux||apt-get install snapper|
|CentOS||yum install snapper|
|Fedora||dnf install snapper|
|Raspbian||apt-get install snapper|
snapper Command Examples
1. List snapshot configs:
# snapper list-configs
2. Create snapper config:
# snapper -c config create-config path/to/directory
3. Create a snapshot with a description:
# snapper -c config create -d "snapshot_description"
4. List snapshots for a config:
# snapper -c config list
5. Delete a snapshot:
# snapper -c config delete snapshot_number
6. Delete a range of snapshots:
# snapper -c config delete snapshot_X-snapshot_Y
In summary, snapper is a powerful tool for managing filesystem snapshots on Linux systems. Its ability to create, manage, and manipulate snapshots in a transparent and flexible manner makes it a valuable tool for system administrators and developers who need to manage and protect important data.