- Install timeshift-autosnap-apt - Timeshift auto-snapshot script which runs before any
apt update|install|remove
command using aDPkg::Pre-Invoke
hook in APT. Works best inBTRFS
mode, butRSYNC
is also supported (on ext4 might be slow though, but your system is automatically snapshot before upgrade/install)
Features
- This script is a fork of timeshift-autosnap from the AUR, but adapted for usage with the APT package manager of Debian or Ubuntu based systems.
- Creates Timeshift snapshots with a unique (customizable) comment.
- Keeps only a certain number of snapshots created using this script.
- Deletes old snapshots which are created using this script.
- Makes a copy with RSYNC of
/boot
and/boot/efi
to/boot.backup
before the call to Timeshift for more flexible restore options. - Can be manually executed by running
sudo timeshift-autosnap-apt
. - Autosnaphots can be temporarily skipped by setting "SKIP_AUTOSNAP" environment variable (e.g.
sudo SKIP_AUTOSNAP= apt upgrade
) - Supports grub-btrfs which automatically creates boot menu entries of all your btrfs snapshots into grub.
- For a tutorial how to use this script in production to easily rollback your system, see System Recovery with Timeshift.
Full Article and Installation: GitHub - wmutschl/timeshift-autosnap-apt: Timeshift auto-snapshot script for Ubuntu and Debian based systems which creates snapshots of your system with timeshift before a package install, remove or upgrade using DPkg::Pre-Invoke hook in apt. Fork of timeshift-autosnap from AUR.
23 ...