Public bug reported:

Summary:
On Ubuntu 24.04, Timeshift scheduled snapshots NEVER RUN, even though the GUI 
indicates they are enabled. The failure is silent: no user-visible error is 
shown, and backups only work when manually triggered.

Details:
After installation and configuration of Timeshift on Ubuntu 24.04.3, the GUI 
shows that hourly/daily/weekly snapshots are scheduled and enabled. However, no 
scheduled snapshots are actually created.

Inspection shows that the packaged cron job invokes:

  timeshift --check --scripted

This command does NOT create snapshots. It only checks whether a snapshot 
should be created, then exits. As a result, scheduled backups NEVER run. 
Compounding this:
1. The Timeshift GUI continues to display schedules as enabled and gives no 
indication that snapshots are not being created.
2. No graphical error, notification, or warning is shown to the user, even when 
the user is logged in at the console.
3. No clear error is written to Timeshift logs indicating that scheduled 
snapshots are not occurring.

Manual (On-demand) snapshots work correctly, which masks the problem and
delays discovery.

Expected behavior:
- Scheduled snapshots should actually create snapshots.
- If a scheduled snapshot fails to run, Timeshift should clearly notify the 
user (GUI dialog or notification).
- The GUI should accurately reflect whether scheduled snapshots are truly 
functioning.

Actual behavior:
- Scheduled snapshots NEVER run.
- GUI indicates everything is working.
- Failure is silent unless the user manually inspects cron configuration and 
snapshot history.

Impact:
This creates a high risk of data loss, as users reasonably believe they have 
working backups when they do not.

Environment:
Ubuntu 24.04.3 (noble)
Timeshift version: 24.01.1-1build2
Backup mode: RSYNC
Backup target: external USB drive

------------------

In trying to report this problem using the recommended path, I used sudo
ubuntu-bug timeshift and I saw the Apport window but I can't copy
anything from it, and when I pushed Send the window disappeared and
nothing else ever happened after several minutes, and after then logging
in to this launchpad.net and going to the Bugs page and my page, I find
no way to see the results of that effort, so maybe we need a bug report
on the bug reporting system; what do you think?

I can send Timeshift logs etc. if that will help.

I have set up (with a LOT of help from ChatGPT) a "wrapper" which fixes
the Timeshift "no-scheduled-backups" problem and adds features, and
edited the cron entry to call this wrapper instead of Timeshift
directly, and it normally (hourly) works (though I have not tested any
of the failure modes), including that it logs more info. I will try to
edit this post as soon as I learn how to make this a "code" block:

2026-02-10 10:36 james@Trufflehunter:~$ sudo cat 
/usr/local/sbin/timeshift-wrapper.sh
[sudo] password for james: 
#!/bin/bash
#
# Timeshift single-instance wrapper for cron and manual use
#

LOCKFILE="/run/timeshift.lock"
LOGFILE="/var/log/timeshift-wrapper.log"
TIMESHIFT_BIN="/usr/bin/timeshift"

TIMESTAMP="$(date '+%Y-%m-%d %H:%M:%S')"
CALLER="${1:-cron}"

log() {
    echo "[$TIMESTAMP] $1" >> "$LOGFILE"
}

notify_user() {
    local msg="$1"

    # Only attempt GUI notification if a graphical session exists
    if command -v zenity >/dev/null 2>&1; then
        for uid in $(loginctl list-sessions --no-legend | awk '{print $1}'); do
            user=$(loginctl show-session "$uid" -p Name --value 2>/dev/null)
            display=$(loginctl show-session "$uid" -p Display --value 
2>/dev/null)
            [[ -n "$user" && -n "$display" ]] || continue

            sudo -u "$user" DISPLAY="$display" \
                zenity --error \
                --title="Timeshift" \
                --text="$msg" \
                --ok-label="Bummer" \
                --no-wrap \
                --modal \
                2>/dev/null &
        done
    fi
}

exec 9>"$LOCKFILE"

if ! flock -n 9; then
    log "SKIPPED: Timeshift already running (caller=$CALLER)"
    notify_user "Timeshift could not start.\n\nReason: another snapshot is 
already running.\n\nCaller: $CALLER"
    exit 0
fi

log "START: Timeshift invoked (caller=$CALLER)"

if ! "$TIMESHIFT_BIN" --create --scripted; then
    log "ERROR: Timeshift failed (caller=$CALLER)"
    notify_user "Timeshift failed to complete.\n\nCheck logs for details."
    exit 1
fi

log "SUCCESS: Timeshift completed (caller=$CALLER)"
exit 0
2026-02-10 11:13 james@Trufflehunter:~$ 

IHTH

Jim

** Affects: timeshift (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2141449

Title:
  Timeshift scheduled snapshots silently fail due to incorrect cron
  command, misleading GUI, and lack of error reporting

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/timeshift/+bug/2141449/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to