Musings Through the Lens...

View Original

Fixing an Acronis True Image 2016 Hang During Backup

Update:

There's a more direct solution available but the original solution I found is below.

The Problem

In the last month or so, my copy of Acronis True Image 2016 has been hanging during the scheduled backup every night. It hangs while showing the calculating remaining time status. Seems to fit the description talked about in the Acronis forums. The posted solution that seem to make the most sense was the problem with Microsoft's Volume Shadow Copy (the VSS service) features but I didn't want to just disable that service as suggested.

Looking for the Solution

Being a techie and knowing Windows pretty well I knew services could be enabled and disabled from the command line using the SC commands. I figured combining that with True Image's ability to run commands before and after a backup I could disable and reenable VSS and fix the problem. The problem with that is the SC commands require admin-level privileges to run. Trying to automate that without causing a User Access Control (UAC) prompt was something to overcome. I didn't know that this would be a problem while the backup was being run but I knew I didn't want it to be one.

While looking for a way around that I found this post at How-To Geek and another at TechRepublic. They talk about using an on-demand scheduled task set to use elevated privileges and then calling that task from a lower privilege session via the schtask command. Seemed to fit my needs nicely.

Implementing the Solution

I could probably have taken the time to do this in just two batch jobs, one to run as the on-demand scheduled task and one to execute that scheduled task. All I'd have to do is check the service state and act accordingly but I was in a rush and don't mind straight, simple solutions even if they require more batch jobs than I could otherwise have used. It wasn't like I was going to be executing these batch jobs by hand.

The batch jobs were simple.disable_vss_elevated.bat containing a single line of:

sc config vss start=disabled

enable_vss_elevated.bat containing a single line of:

sc config vss start=demand

I turned those into scheduled tasks called "Elevated_Disable_vss" and "Elevated_Enable_vss" using the procedures explained at How-To Geek. post I talked about above. (And the TechRepublic one.) Since they do a good job explaining it I won't go into detail.

I then created two other batch jobs.vss_disable.bat containing the single line:

schtasks /run /TN Elevated_Disable_vss

vss_enable.bat containing the single line:

schtasks /run /TN Elevated_Enable_vss

Then in the backup's Advanced tab I set them to be run as the Pre and Post-commands of the backup job.

Acronis Backup Options

Since setting this up the backup job has not hung once and completes every night.

Updated 3/29/2016 with the link to the right article about using on-demand scheduled tasks at How-To Geek and added the TechRepublic link.