The snapper documentation itself is big and hard to grasp at once, so start here for a few examples on how to get going, or how to assess your current configuration:
For a very good snapper introduction seems to be gone, but was present in the OpenSuSE documentation archive circa version 13.2 at [WayBack] Chapter 4. Snapshots/Rollback with Snapper | ActiveDoc which I’ve quoted below.
Between that version and LEAP, the retention got moved from “timeline” based to “number” based. More on that in these links:
Man pages:
Introduction
4.1.1 snapshots and Disk Space #
When a snapshot is created, both the snapshot and the original point to the same blocks in the file system. So, initially a snapshot does not occupy additional disk space. If data in the original file system is modified, changed data blocks are copied while the old data blocks are kept for the snapshot. Therefore, a snapshot occupies the same amount of space as the data modified. So, over time, the amount of space a snapshot allocates, constantly grows. As a consequence, deleting files from a Btrfs file system containing snapshots may not free disk space!
Note: Snapshot Location
Snapshots always reside on the same partition or subvolume that has been snapshotted. It is not possible to store snapshots on a different partition or subvolume.
As a result, partitions containing snapshots need to be larger than “normal” partitions. The exact amount strongly depends on the number of snapshots you keep and the amount of data modifications. As a rule of thumb you should consider using twice the size than you normally would.
Tip: Freeing space / Disk Usage
In order to free space on a Btrfs partition containing snapshots you need to delete unneeded snapshots rather than files. Older snapshots occupy more space than recent ones.
Since the df does not show the correct disk usage on Btrfs file systems, you need to use the command btrfs filesystem df MOUNT_POINT. Displaying the amount of disk space a snapshot allocates is currently not supported by the Btrfs tools.
–jeroen
Like this:
Like Loading...