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.52k stars 91 forks source link

Broken system after restore (when `/boot` is on separate partition) #365

Open mwoz123 opened 3 weeks ago

mwoz123 commented 3 weeks ago

Describe the bug I've (luks encrypted) btrfs / + separate /boot (ext4 & efi). Due to that /boot dir is not inclueded in backups, this means restoring backup will cause also /boot to be skipped.

Let's say I was on Mint 22 (Ubuntu 24) and tried to restore Mint 21 (Ubuntu 22), the system won't be usable due to mismatch in modules on restored system and in linux image (which was unchanged).

To Reproduce Steps to reproduce the behavior:

  1. On linux that consist of separate /boot partition & root btrfs
  2. create a btrfs backup
  3. upgrade linux image, purge previous one
  4. restore timeshift btrfs backup

Expected behavior /boot folder to be included/copied to btrfs backup (or other place so it could be restored.

After restore root, timeshift should also restore /boot backup.

Maybe a good idea would be to allow creating "custom script"/hooks to be executed after each backup and another one after each restore (that would allow to copy over the /boot dir) - and might be also usefull for different scenarios.

Screenshots N/A

System:

mwoz123 commented 4 days ago

From what I see there's a place for post restore hooks from /etc/timeshift/restore-hooks.d dir but unfortunetely it's executed only for RSync restore, not for BTRFS :(

I as for this scenario also post backup would be required.