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.
1.53k stars 75 forks source link

BTRFS snapshots need to be deleted twice for successful deletion #291

Open Fxzzi opened 3 months ago

Fxzzi commented 3 months ago

Describe the bug For some reason, deleting a snapshot in timeshift (I am using the GUI) will result in a "Snapshot deleted with errors". The snapshot stays visible in the GUI. However, if I just delete the snapshot again, it seems to successfully remove it.

To Reproduce Steps to reproduce the behavior:

  1. Create a manual snapshot (this happens with all snapshots, this is just to repro)
  2. Attempt to delete the snapshot and observe the error
  3. Attempt to delete it again and observe it deletes successfully

Expected behavior The snapshot should be deleted successfully the first time.

Screenshots Screenshot from 24 04 02 11:45:52 Screenshot from 24 04 02 11:46:04 Screenshot from 24 04 02 11:46:07

Same behaviour occurring in cli: image

System:

Costasas commented 2 months ago

Pop!_OS 22.04 LTS 6.8.0-76060800daily20240311-generic with BTRFS Same error

Fxzzi commented 1 month ago

Bump, is anyone able to help here? Is there something wrong with my fs? I've tried btrfs checks.

atiredman commented 4 weeks ago

Just wanted to chime in and say I am also seeing this issue with Btrfs Arch Linux (6.9.3) running the Cinnamon desktop (6.0.4). In my case, it can take 2 or even 3 attempts to delete some snapshots.

I did some investigating by clicking Browse Files between deletion attempts. My snapshots typically contain 3 files/folders @, @home, and info.json. When I attempt to delete a snapshot with those three files/folders, the following occurs:

The first attempt results in the same “Snapshot(s) Deleted With Error” message Fxzzi shows, but browsing the files shows @home has been deleted.

The second attempt at deleting the snapshot results in the same “Snapshot(s) Deleted With Error” message, but this time @ is also deleted, leaving only info.json.

The 3rd attempt finally deletes the snapshot successfully.

Fxzzi commented 4 weeks ago

The 3rd attempt finally deletes the snapshot successfully.

Probably takes you 3 attempts because you are backing up your @home also. For me it'll only take 2 as I only backup my main @ subvolume.

atiredman commented 4 weeks ago

Probably takes you 3 attempts because you are backing up your @home also. For me it'll only take 2 as I only backup my main @ subvolume.

That is correct, if I don't back up my @home, it only takes 2 attempts to delete.