No resume after sleep / hibernation pause mode on headless node


#1

Hello all!

I found a few topics regarding same or similar issues but all seem to be at least older than 1 year so I thought of opening another topic as it seems that this problems hasn’t been solved? but maybe it’s just me and anyone can help me.

My environment:
Intel NUC 8, Windows 10 - 1809 (pro) (usually headless)
Duplicati 2.0.4.5_beta_2018-11-28
Duplicati running in user mode
Backup source: SMB connection (that whats the user mode is for)
Backup Destination: SFTP server
" Pause after startup or hibernation": 30 seconds

What am I trying to do:
I have a proprietary (sic) NAS which allows me to login as a the local root user but is unable to run a lot of software as the manufacturer does not ship any libs or software except the basic linux underneath. My NAS runs only in the hours someone is at home and will power down in the “out of home” hours. Some data on the NAS should be backuped onto my cloud server over SFTP, this where duplicati and my intel NUC comes in. The NUC is placed right next to my NAS and has not much to do besides doing backups so it will remain in hibernation for most of the day.

At around 0:30 AM, duplicati should perform the backup. The NUC will be woken up by my NAS sending a wake-on-lan package to wake my NUC from sleep. a few minutes earlier.
So far so good.

Now comes the part that doesnt work: duplicati stays paused forever.
I did a lot of testing and playing around and it looks like the problem I’m having is only happening when duplicati is used on a headless node (no display & no mouse/keyboard connected)

Situation after a reboot:
The user is logged in automatically as the user has no password, duplicati starts up and will come out of the pause mode as it should. This applies to headless as well as when a display and mouse has been connected.

Situation after sleep / hibernation:
The user is logged in automatically (same as after reboot).
With Display&Mouse: duplicati comes up and is resumed after the set 30 seconds (hurray)
headless: duplicati stays paused until I hit the resume button, either over RDP or a web interface.

Does anyone have an idea how to solve this?
maybe something like a “–enable-pause = false” option for duplicati would be great, haven’t found something like that.

Server state properties

  • lastEventId : 10
  • lastDataUpdateId : 3
  • lastNotificationUpdateId : 0
  • estimatedPauseEnd : 0001-01-01T00:00:00
  • activeTask :
  • programState : Paused
  • lastErrorMessage :
  • connectionState : connected
  • xsfrerror : false
  • connectionAttemptTimer : 0
  • failedConnectionAttempts : 0
  • lastPgEvent :
  • updaterState : Waiting
  • updatedVersion :
  • updateReady : false
  • updateDownloadProgress : 0
  • proposedSchedule : [{“Item1”:“1”,“Item2”:“2019-03-09T23:30:00Z”}]
  • schedulerQueueIds :
  • pauseTimeRemain : 0

UPDATE @ 6PM
I played around some more and migrated from UserMode to using duplicati as a service.
believe it or not, this does NOT solve the problem. It seems that, when windows is entering sleep mode on of the last actions done is that duplicati enters the “pause” mode. This is just an guess but when windows goes to sleep the WebUI of duplicati changes and show that duplicati is paused for a short moment before it is not reachable anymore.

I tried running it as “system” and as the user it is supposed to run as, both with the same outcome.

tl;dr:
duplicati stays in pause mode forever after headless system wakes from sleep.


#2

Workaround
As the problem only occurs after the system wakes from sleep I created a simple workaround.

  1. create on-liner Powershelll script.
    “Restart-Service duplicati”
  2. create Task in Task Sheduler
    2.1 General: “Run whether user is logged on or not” & “Run with highest privileges”
    2.2 Trigger: On event > Log: System > Source: Kernel-Power > Event ID: 107
    2.3 Action: Start a program: Powershell.exe -ExecutionPolicy Bypass C:\Scripts\restartDuplicati.ps1

This will restart duplicati after the system wakes up from sleep (Log event id 107)and duplicati will run as expected.

Not the Solution I was looking for but maybe it helps someone else out there :slight_smile: