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.
MIT License
154 stars 20 forks source link

errors generated but seems to work #15

Open jfabernathy opened 1 year ago

jfabernathy commented 1 year ago

I've had sucess with timeshift-autosnap-apt on Ubuntu,Linuxmint, and LMDE5, but I'm trying today to use it on the RC1 of Debian 12 Bookworm. Timeshift works, grub-btrfs works and when I install a package with apt I get a snapshot in my list of timeshift snapshots with the comment: {timeshift-autosnap-apt} {created before call to APT}

This is the log I get when I run sudo timeshift-autosnap-apt

Found 10 snapshot(s)
Unmount /tmp/grub-btrfs.Y6qbVK8sWN .. Success
grep: /boot/grub/grub.cfg.new: No such file or directory
chmod: cannot access '/boot/grub/grub.cfg.new': No such file or directory
cannot open `/boot/grub/grub.cfg.new': No such file or directoryUsage: /usr/bin/grub-script-check [OPTION...] [PATH]
Try '/usr/bin/grub-script-check --help' or '/usr/bin/grub-script-check
--usage' for more information.
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
jfabernathy commented 1 year ago

I just tried again to run sudo timeshift-autosnap-apt and it didn't generate errors:

sudo timeshift-autosnap-apt
Rsyncing /boot into the filesystem before the call to timeshift.
Rsyncing /boot/efi into the filesystem before the call to timeshift.
Using system disk as snapshot device for creating snapshots in BTRFS mode
Mounted '/dev/nvme0n1p2' at '/run/timeshift/18125/backup'
btrfs: Quotas are not enabled
Creating new backup...(BTRFS)
Saving to device: /dev/nvme0n1p2, mounted at path: /run/timeshift/18125/backup
Created directory: /run/timeshift/18125/backup/timeshift-btrfs/snapshots/2023-04-14_11-16-40
Created subvolume snapshot: /run/timeshift/18125/backup/timeshift-btrfs/snapshots/2023-04-14_11-16-40/@
Created subvolume snapshot: /run/timeshift/18125/backup/timeshift-btrfs/snapshots/2023-04-14_11-16-40/@home
Created control file: /run/timeshift/18125/backup/timeshift-btrfs/snapshots/2023-04-14_11-16-40/info.json
BTRFS Snapshot saved successfully (0s)
Tagged snapshot '2023-04-14_11-16-40': ondemand
------------------------------------------------------------------------------
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-7-amd64
Found initrd image: /boot/initrd.img-6.1.0-7-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Found snapshot: 2023-04-14 11:16:40 | timeshift-btrfs/snapshots/2023-04-14_11-16-40/@ | ondemand        | {timeshift-autosnap-apt} {created before call to APT} |
Found snapshot: 2023-04-14 10:54:50 | timeshift-btrfs/snapshots/2023-04-14_10-54-50/@ | ondemand        | {timeshift-autosnap-apt} {created before call to APT} |
Found snapshot: 2023-04-14 10:51:26 | timeshift-btrfs/snapshots/2023-04-14_10-51-26/@ | ondemand hourly | {timeshift-autosnap-apt} {created before call to APT} |
Found snapshot: 2023-04-14 10:00:01 | timeshift-btrfs/snapshots/2023-04-14_10-00-01/@ | hourly          | N/A                                                   |
Found snapshot: 2023-04-14 09:00:01 | timeshift-btrfs/snapshots/2023-04-14_09-00-01/@ | hourly          | N/A                                                   |
Found snapshot: 2023-04-14 08:00:02 | timeshift-btrfs/snapshots/2023-04-14_08-00-02/@ | hourly          | N/A                                                   |
Found snapshot: 2023-04-14 07:00:02 | timeshift-btrfs/snapshots/2023-04-14_07-00-02/@ | hourly          | N/A                                                   |
Found snapshot: 2023-04-14 00:00:02 | timeshift-btrfs/snapshots/2023-04-14_00-00-02/@ | daily           | N/A                                                   |
Found snapshot: 2023-04-13 22:51:52 | timeshift-btrfs/snapshots/2023-04-13_22-51-52/@ | ondemand        | after /var/{log tmp cache} setup                      |
Found snapshot: 2023-04-13 22:35:35 | timeshift-btrfs/snapshots/2023-04-13_22-35-35/@ | ondemand        | initial snapshot                                      |
Found 10 snapshot(s)
Unmount /tmp/grub-btrfs.DUWVa8YJBQ .. Success
done