BTRFS Timeline Snapshots 'Number'

Hey all, I keep running out of disk space with my snapshots so I’m just tailoring my snapshot count to reduce how often I run out of space.

I love this tool but I find this one feature not self-explanatory, so I’m just wondering what exactly is referred to by this ‘number’? Thanks!

I tells how many snaps per certain interval to retain with the last on the bottom stating the total amount.

It works like an access list from top to bottom. If a condition is met it moves to another and so on.

If your snapshots are taking up too much space you can follow this procedure:

  • Delete all snapshots.
  • Enable BTRFS quotas.
  • Reboot.
  • Perform a BTRFS scrub.
  • Perform a BTRFS balance.
  • Reboot
  • Configure your snapshot retention policy.
  • Take a new system snapshot.

Caveats:

Enabling BTRFS quotas can cause issues on some systems. This is rare, but this feature is disabled by default for this reason. Enabling BTRFS quotas will allow far more accurate tracking of free space on BTRFS partitions.

Deleting all snapshots is not a good idea if you are currently encountering any serious bugs on your system. If your system is operating properly, then deleting all snapshots should not be particularly risky. Just be sure to take a new snapshot before performing any changes to your system such as installing new programs or performing a system update.

3 Likes

I think the best way to keep clean the snapshots is just to react on the Notification “Delete old Snapshots” that pops up in Garuda.

This is a nice feature that remembers me to clear of very old snapshots

That’s how I originally thought it worked but generally I have a number which is approximately equal to the total of those interviews, eg 2+7+3+4=16.

I basically follow that procedure. :slight_smile:

1 Like

Yes correct, cause it needs to meet all the conditions before it removes something.

So for example lets say you have set 2 snaps for 1h but actually there are 3 now cause you did a new run in the same hour.

If that oldest of those 3 matches as well the other conditions of snaps it will be removed and you end up with 2 per hour again.

All conditions needs to be met before something is removed that’s why you end up with 16 snapshots in total ;). Thats what is a called a retention policy.

1 Like

The numbers you have defined in your screenshot are the number of snapshots which will be kept when the Snapper cleanup job runs. You will continue to accumulate snapshots normally (according to whatever configuration you have defined) in between the cleanup jobs.

By default the cleanup job runs once per day, but if you wish you can change the schedule to run more or less frequently. See this comment for example:

4 Likes