Scheduled backups not starting after wake from sleep

I’m using Duplicati to back up a Windows PC. Duplicati is set up as a service, SYSTEM account, with no tray icon.

The PC typically goes to sleep after idle in the evening. I have the PC set to wake via a scheduled task at 01:56. That seems to be working: I can see the resume in the Windows event log. Then I have my Duplicati backups scheduled for 02:00. However, they don’t seem to start.

When I log on in the morning, and go to the Duplicati UI I can see the backup has just started. The time it shows that it started is immediately after the wake that I generated by wiggling the mouse. There’s no record in the UI or logs of anything happening at 02:00.

So it seems like when the computer wakes with the wake timer, the Duplicati scheduler doesn’t start. When I wake the computer with the mouse much later, the scheduler does start and immediately starts the missed backup.

I’m a bit of a newbie so maybe I have something set up wrong in Duplicati. Or maybe this is an issue? Anyway, any suggestions for diagnostics that might help?

I notice some earlier posts with similar but not identical issues: they suggest I restart the Duplicati Service on wake, as a workaround. I could do that but it seems it might be worth looking into the problem more first.

Windows 10 2004, Duplicati 2.0.5.1_beta_2020-01-18

Just a bit more information - I tried using wake on lan rather than a wake timer and that does seem to work: the Duplicati scheduler starts running immediately after the wake on lan.

So it only seems to be wake from wake timer which isn’t working.

Can you get PC awake with Duplicati paused, but UI visible?

If you use Tray Icon, does it look paused (vertical bars icon)?

Does web UI to right of status show vertical bars or triangle?

Look at Server state properties.in About --> System info

If I tell the UI to pause, I “think” that’s like a sleep. Looking then:

estimatedPauseEnd : 0001-01-01T00:00:00
programState : Paused
pauseTimeRemain : 0

If I use main screen Settings to pause 10 minutes after wake:

estimatedPauseEnd : 2020-10-21T08:09:37.9844007-04:00
programState : Paused
pauseTimeRemain : 487027 (milliseconds until the resume)

Duplicati uses Windows power mode change events (interpreted through .NET Framework) below.

and I don’t see much logging at the Duplicati level, though possibly you might find some differences in Windows registry event sequences or powercfg, maybe /lastwake or /sleepstudy, maybe other things.

PowerModeChanged triggers late is kind of worrisome in its advice (which may or may not be correct)

PowerModeChanged does not fire until a key is pressed or mouse is moved

and

In Windows 10, version 1507 systems or later, if the system is resuming from sleep only to immediately enter hibernation, this event is not delivered. A WM_POWERBROADCAST message is not sent in this case.

I’m pretty sure that (before I disallowed this), I’ve seen Windows wake to do something, then go back to sleep. I forget whether it even can be noticed on the display, or if it’s just some fans running for awhile…

Thanks for the input.

I don’t think I can check anything in the UI because the scheduler seems to start as soon as I log on, or at least log on to the Web UI, maybe the tray might work …

It might very well be to do with the two different signals: I know that the wake timer is definitely treated as “unattended” (presumably this is PBT_APMRESUMEAUTOMATIC) because I know that Windows uses a different idle timer when it’s woken unattended and that’s what it uses for the wake timer.

I think I’m going to use command line and the Windows scheduler, but it’s a bit sad I can’t get the Duplicati one to work.

So rather than use the Windows scheduler, I’ve arranged for another computer (in fact the one I’m saving to) to send a Wake On LAN to the Windows client just before the backup is supposed to start. Unlike the wake timer, Wake On LAN does seem to work: the Duplicati scheduler un-pauses and does the backup as expected.

Seems to be a pretty straightforward work-around.

1 Like