linuxmint / timeshift

System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.
2.51k stars 91 forks source link

Timeshift keeps more than three weekly backups when it is set to keep only three. #314

Open Armag67 opened 5 months ago

Armag67 commented 5 months ago

Describe the bug Timeshift keeps more than three weekly backups when it is set to keep only three.

To Reproduce Steps to reproduce the behavior:

  1. Set Timeshift to 3 weekly snapshoots.
  2. Wait 4 weeks.
  3. And now you have 4 weekly snapshoots in is GUI (and also on the tree structure of the backup drive).

Expected behavior Only three snapshoots should appear in the GUI of Timeshift-gtk and the in the tree structure of the backup drive.

Screenshots T_settings T_main T_tree_structure

System:

Elliot4444 commented 3 months ago

Maybe it is the same problem I have since a couple of weeks. Before that it worked flawlessly for years. Timeshift gets errors when deleting a snapshot. It stays in the list and it is 0 KB of size (shown in Timeshift version 24.06.3):

grafik

So I have also 4 snapshots and I only want 3. If I delete it manually again, it is gone. The error in the log is like this:

[07:07:41] Schnappschuss wird entfernt: 2024-07-28_10-51-46 [07:07:41] Unterlaufwerk wird gelöscht: @ (Id:907) [07:07:41] btrfs subvolume delete --commit-after '/run/timeshift/9963/backup/timeshift-btrfs/snapshots/2024-07-28_10-51-46/@' [07:07:41] Gelöschtes Unterlaufwerk: @ (Id:907)

[07:07:41] qgroup wird zerstört: 0/907 [07:07:41] btrfs qgroup destroy 0/907 '/run/timeshift/9963/backup' [07:07:41] E: Zerstören der qgroup ist fehlgeschlagen: '0/907' [07:07:41] E: Entfernen des Schnappschusses ist fehlgeschlagen: 2024-07-28_10-51-46

I found the same problem while researching. They assume it has to do with BTRFS subvolumes within subvolumes or something, which cannot be deleted and sometimes from docker. But this is not the case here. The only file which is left in the deleted snapshot is this:

grafik

I am on Linux Mint 22 but it started on 21.3. May some BTRFS changes in some kernel update?

fromSmolsoft commented 1 week ago

It might be related to what i experience.

When I run timeshift from command line to create weekly snapshots (without arg comments), timeshift reports Maximum backups exceeded for backup level 'weekly' but won't remove any entries.

Interestingly enough when snapshots is created with tag "W" , timeshift also prints out Tagged snapshot '2024-11-17_13-39-48': ondemand

It used to keep specified number of snapshots per tag but it's no longer the case for me.

Specs: