Option to inhibit sleep during backup

I’ve got several windows 10 machines with urbackup installed. For sake of saving on power consumption, all of them are set to sleep if they don’t get any activity. For some of these machines they’ll only get used once or twice a day, and otherwise sleep. Because the machines sleep so aggressively, Urbackup can’t finish running backups. Even incrementals get interrupted half of the time.

If urbackup had a setting to inhibit sleep while a backup was running, that would make it more reliable for backups to finish.

Related to this, it’d also be wonderful if urbackup could schedule the machine to wake automatically at the next backup time slot for an incremental backup to run.

1 Like

Awesome idea! +1 if uroni is looking :slight_smile:

1 Like

I’m sure the devs know better than me but because I need my clients always on to receive updates and such I generally use this script to change their power plan.

Try {
    $HighPerf = powercfg -l | %{if($_.contains("High performance")) {$_.split()[3]}}
    $CurrPlan = $(powercfg -getactivescheme).split()[3]
    if ($CurrPlan -ne $HighPerf) {powercfg -setactive $HighPerf}
} Catch {
    Write-Warning -Message "Unable to set power plan to high performance"
}

If you could find a way to export the existing power plan in Windows then you could restore it after the backup is finished.

It already prevents sleep during backups. Must be something about the configuration etc.

2 Likes

Are you sure the devices are awake when the backup starts?

I haven’t been paying super close attention, but I’ve seen these machines go to sleep several times. Specifically some of the machines in my home.

Steps I’ve taken before:
Power on the machine from cold shutdown
Log in to account with admin rights
Locate tray icon for Urbackup
Right click -> Initiate full backup
Walk away
Come back an hour later, machine is sleeping
Look at Urbackup webgui, shows status of backup at half-done.

Is it able to inhibit sleep from, e.g. laptop lids being closed? Or is it only able to inhibit sleep from the inactivity timeout?

Note, I’m not saying that the machine in my example was a laptop, or that it went to sleep from the lid being shut. I do have laptops that are set to sleep on lid shut, but the machine I had in mind for my example was a desktop.

I’m also not doing anything exotic here. The best feature of Urbackup is that it’s an “Install the client, and you’re completely good to go” software. As far as I know, I haven’t changed any settings on any of the clients beyond basic windows settings accessible from the various Windows GUIs. So these should be as vanilla as they get. I certainly haven’t run any urbackup scripts on the client. Just installed and left it alone. Some settings on the urbackup server have been changed, such as backup directories and such but nothing out of the ordinary.

Windows applications cannot prevent the computer from sleeping if it is configured to sleep when the lid closes. It can only prevent the idle sleep.

2 Likes

Hey, sorry to tune into this old Thread.
I’m on a Desktop-PC which turns of it’s screen after 15 minutes and goes into Standby after 30 minutes. Some longer Backups fail when the PC goes into Standby. You mentioned UrBackup should prevent sleeping while it is doing a backup, but this doesn’t seem to be the case.

Errors 09/07/25 05:21 Client went offline.
Errors 09/07/25 06:27 Backup failed
undefined -— -—

Anything I could have misconfigured? There seem to be other people having this issue: How do y'all backup laptops (get around sleep, hibernate)? - #6 by DaaNMaGeDDoN

Also regarding resumed File-Backups. At what points is it able to resume? Does it resume all Files (so it can just continue like nothing happens) or does it resume per Partition/Indexing Locations so if it fails on the same partition twice it can’t resume that partition?

Thanks for your Help!

The latest version might fix this on Windows 11 (2.5.26). Are you using that one?

I haven’t tested to verify the fix.

I’m still on 2.5.25 (Windows 11). Thought it was fixed in 2.5.23. Will update and try again, thanks!

I did not see a futher response so I add that I still have the client going to sleep issue on Windows 11 machine with urbackup client version 2.5.26.

First time user of UrBackup and I just realized this issue. I’ve set my computer to sleep after 1h, and so it does, regardless of the backup, meaning that it never completes it.

Using 2.5.26 already.

You can use an application like DontSleep to prevent your computer from sleeping, but the underlying issue may not get fixed until the devs look at this. Unfortunately getting their attention has been hit or miss, my personal miss rate is 100%.

Please check if it works with the just released 2.5.27. Thx!

1 Like

In fact, i wasnt struggling with it, the way i described it works very well, every 3 days at 3am in the morning my dad’s laptop is backed up. I have to say though that back then i noticed sometimes the laptop would still disconnect before a backup was initiated, but that seems to be a thing of the past. A way to “prioritize” his laptop might be to set a lower delay than other clients on the server, if you are like me and your server can’t really handle more than 2 backup jobs to run simultaneously.
Another thing i did notice back then is that if the backup fails, the script to set the power scheme back to balanced is not run, so another improvement would be to have a task set to run at 5am to set it back to balanced regardless of what is going on. But i dont think i will invest more time in that at his end; my dad is fed up with Windows and i more or less already convinced him i should put kde/plasma on it. But i have do have a friend with a laptop that i will configure the same way (and the CBT license will move to his laptop), so its good to be refreshed on how i did that back then. Remember you can set those tasks not to run when the laptop isnt plugged into the charger. Also in the meantime i have opened up the webgui to the WAN so he should be able to monitor the backups and recover from his backups if he just gives me a shout so i can power on the backupserver. When he want to have a backup made, all he needs to do is have his laptop plugged in at one of the 3 intervals the backup server will come online. Offtopic, note to self: need to figure out how he can backup an external drive that way, probably just a letter added to the backupdirs and set as an optional backupfolder.
As you can see its a bit of a hit and miss, sometimes a backup is done during the day so it wont run in the night, meaning the next one might be done during the day and i could force that by setting a timewindow for the client, but this is fine; about every 3 days an incremental backup is made with little to no issues.

Unfortunately, my PC still goes to sleep in the middle of a full image backup with version 2.5.27-cbt. Please let me know if there are any logs I could provide to help debug this issue.

Sry, CBT version is not updated yet. Will do that soon.

Thank you for the response. That would be consistent with my observations then. I will stand by for the next cbt version and report back.