Skip to main content

Acronis Backup (BU) Using Rotating USB Drives

Thread needs solution
Forum Member
Posts: 14
Comments: 79

I've been working with Steve Smith (Acronis MVP) to develop a procedure "Acronis Backup (BU) Using Rotating USB Drives" using the Windows Task Scheduler and would greatly appreciate a review by others seeking a similar solution. I have attached the latest version of the PDF for the procedure. I have it working on one PC but it fails on a 2nd PC. I had attempted to use the Pre/Post commands in ATI but could not get it to work and then started down the path to use the Windows Task Scheduler.

Following are what I think are some relevant details regarding the two laptop PCs.

Working PC

  • Windows 10 x64
  • One internal HD with two partitions, e.g. C & E, 698GB TOSHIBA MQ01ABD075 (SATA), no special security
  • One USB test drive has Bitlocker applied
  • One USB test drive does NOT have BitLocker applied, both drives are available in my office
  • Location of BAT file E:\BackupToCorrectDrive.BAT

Non-Working PC

  • Windows 10 x64
  • One internal HD with ONE partition, e.g. C, 238GB INTEL SSDSC2KW256G8 (SATA (SSD)). Bitlocker has been applied to this drive. Security is a major concern.
  • The two USB backup drives (4TB drives) both have Bitlocker applied. 
  • Location of BAT file C:\ATI\BackupToCorrectDrive.BAT
  •  
  • I can execute the BAT file and it will work, e.g. ATI creates the BU, but when the Windows Task Scheduler runs the BAT file the backup is NOT created. I've searched the internet for a solution, this seems to be a common problem with the Task Scheduler and BAT files, but none of the suggested solutions have been successful for me. I suspect that there is possibly a security issue with the BAT file being on the "C" partition. 
  • I have limited remote access to this PC.

I've attempted to verify the setups and ensure basically they are the same where possible. 

The attached PDF has more details. I'm open for suggestions to enhance the document.

On my PC I have the two "Acronis Backup (BU) Using Rotating USB Drives" files (MS Word and PDF) in a dropbox and will share the dropbox if you are interested and possibly desire to modify the word file. Currently, the tracking option is turned on so I can easily see what has changed.

0 Users found this helpful
Legend
Posts: 73
Comments: 16452

John, have checked the Windows Event Logs on the problem computer to see if there are any entries for the time when the scheduled run of the batch file fails?

Forum Member
Posts: 14
Comments: 79

Steve, I did check the logs last week (I failed to capture an image but will do so) and will recheck when I can get access to the remote system either late tomorrow or the next day. If I recall correctly (with my failing memory this is questionable) there was an entry that showed the task was triggered to run. Also, I will attempt to verify the scheduled task on both systems and ensure they are identical in the setup. It is possible that I've goofed and made a change in one  that has created the issue.

Legend
Posts: 73
Comments: 16452

John, if you have opportunity, create an Acronis System Report and that will include the Event logs so that you can bring them back in the zip file to your own computer then look at them at your leisure away from the main computer.

Forum Hero
Posts: 36
Comments: 7024

John,

On your non-working PC, try moving the batch file to the root of C: 

I'm thinking that will address security permission levels.

Forum Member
Posts: 14
Comments: 79

OK I'm back, I was at Oak Island NC but with the coming of the hurricane we decided to cut the trip short.

I did more testing on my sons PC and made no progress and decided to go back to my PC and discovered I cannot get the BU to run unless the ATI app is open. If it is closed running the bat or the scheduled task will NOT produce a BU. I opened ATI and created a BU as follows.

  1. Ran the BAT file (it is located on the E partition of the drive in the laptop
  2. I ran the scheduled task by clicking on the RUN item in the "Selected Item) area
  3. I changed the scheduled time to two minutes form the current time

I closed the ATI window and tried the above three test, none produced a BU.

If I look at the history in the Task Scheduler for the task it states that the task ran successfully.

I'm totally confused at this time and open for suggestions. Before going on the trip I thought I had it running on my PC but it appears that I did not.

Legend
Posts: 73
Comments: 16452

John, there looks to have been a change in the way the TrueImageLauncher works with ATI 2019 from how it worked in earlier versions.

See forum topic: Running tasks via TrueImageLauncher.exe /script is not working where another user has found this too but has found a workaround that he uses.

Legend
Posts: 73
Comments: 16452

John, I have tested the workaround with my batch file launched via the Task Scheduler and it worked fine without showing the main ATI 2019 GUI and the backup was performed.

Change to the batch file was as follows:

echo off
set ATI="C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageLauncher.exe"
%ATI%
timeout /t 30
set task1=17E00459-2503-464F-9A19-007F372BD594
set task2=AAA16FAB-2B59-4DBB-86EB-973CDA8689DA
if exist L:\BackupDrive1.txt goto backup1
if exist L:\BackupDrive2.txt goto backup2
exit

:backup1
%ATI% /script:%task1%
goto cleanup

:backup2
%ATI% /script:%task2%
goto cleanup

:cleanup
taskkill /im trueimage.exe /F
exit

The timeout /t 30 line was added to allow 30 seconds for the TrueImage background task to do its launch activities before launching the backup task.

Forum Star
Posts: 116
Comments: 2572

There is a new feature in ATI 2019 which seems to use the disk id of USB devices (USB sticks and USB HDD) to determine if a backup task should be run. It will only run the task if the correct USB device is connected. I tested this during beta testing with two 120gig USB sticks and the backup would only run if I had the correct stick attached.

Ian

Forum Member
Posts: 14
Comments: 79

Ian, where is this described? I have not been able to find it. Or can you describe how you implemented it? I'd like to test and see if it resolves my issue.

Forum Star
Posts: 116
Comments: 2572

The information below was given to beta testers:

"New scheduling option: backup starts upon USB attachment
A new event-based scheduling option – “When an external device is connected” – was introduced to simplify the backup schemes for those users who use external USB drives as a backup destination.

How to test
Open Acronis True Image and select Add backup.
Select any backup source.
Specify a USB drive as a destination.
Open the Options menu and select the scheduling Upon event – When an external device is connected.
Select Later on the backup plan tab and unplug the USB drive.
Then plug the drive for the backup to start."

There is nothing I can find in the manual about it, but the instructions seem to work with the release version.

Ian

Forum Member
Posts: 14
Comments: 79

Steve, I just tested your workaround and I encountered an issue. Assuming I made the update correctly, I did double-check and it seems that I did it correctly.

  1. I updated my bat file
  2. In my file manager I double-click on the icon for the BAT file
  3. I see ATI open
  4. I see the backup run and completed
  5. ATI does NOT close

If I run the BAT file as admin

  1. I see ATI open
  2. The BU does NOT run
  3. ATI closes

It seems that when I run the BAT file the taskkill is NOT getting executed.  

Further testing, using PAUSE I was able to determine that when the taskkill executed it returned "Access Denied" I then tried 

wmic process where name="trueimage.exe" call terminate
 

this line replaced 

taskkill /im trueimage.exe /F

This worked as long as I had the PAUSE statements in the BAT, when I removed them ATI opened, did NOT create the BU, but ATI did close. I'm trying to determine how to use the WAIT statement.

Forum Member
Posts: 14
Comments: 79

Ian, I think I found the section in the manual, see "4.6.1.4 Upon event execution parameters" on page 56. I don't think this is going to work for me. I want to leave the drive attached for a week and then swap the drive with another drive for a week. Thus during the week the drive will stay attached and I then want the BU to run daily. I've been working with a BAT file as suggested by Steve but so far I've not had full success.

I don't understand when you stated: "Select Later on the backup plan tab and unplug the USB drive." I don't see a "backup plan" tab. Do you mean "Backup scheme"? On this tab I don't see "other". Sorry to be so dense. 

Legend
Posts: 73
Comments: 16452

John, the 'Select Later' is simply the last option needed to save the backup task configuration without losing them, this is an option on the menu for 'Backup now' shown in the bottom right corner of the GUI which allows you to Backup in 1 hour, Later etc.

Forum Star
Posts: 116
Comments: 2572

John, I have created a test backup to see if it will run the backup each morning when I boot the computer. I will report on my progress. If it works it will make things a lot easier for those who rotate USB backups.

Ian

Forum Member
Posts: 14
Comments: 79

Ian, thanks for the follow-up. I've been testing a bunch and still don't have a solid solution. I'm testing both the procedure that Steve and I are working on and the Pre/Post Command within ATI (see the Advanced tab in the Options for a BU task)

I'm getting very weird results when trying to use the Task Scheduler, sometimes things seem to work and then it will fail to work. I got a lot going on and fear that I'm just getting confused.

With the Pre/Post I cannot get ATI to abort the BU if the BAT file fails. IMHO the documentation for this in the UG is the pits but I do like instructions at the dummies level. 

Rather than waiting until the next day to run a test for the schedule I just set the trigger time to the current time plus 2 minutes.

Sometimes I get different results if the ATI GUI is open/closed.

Also please test and see what you get if the USB drive is NOT attached and the BU task schedule is triggered. In my BAT file if the USB drive is NOT attached it should exit and ATI should see it as a failure but ATI is not seeing it as a failure and attempts to run and of course it does not have the drive. Following is one BAT file I'm testing with the Pre/Post. Currently, I have one BAT file for the Odd week and another for the Even week. Once I get it working I will merge the two as I have for the Task Schedule test.

echo on
Title BAT file to test presence for ODD or EVEN BU drive
REM echo now test to see if the Even BU drive is connected
REM pause
if not exist Y:\Y-Even-BU-Drive.txt (

REM The IF test did succeed thus the drive is NOT connected

 Rem echo The drive is NOT connected
 rem pause

rem wmic process where name="trueimage.exe" call terminate
exit 
)

REM echo The drive is connected
REM Pause

 

Forum Member
Posts: 14
Comments: 79

Steve, regarding your above post on Wed, 09/12/2018 - 06:41 about your BAT file enhancements. I've made similar changes to mine, basically copied your changes but I'm not having total success. I'm super tired tonight and need to get some sleep. I'll try to look at everything tomorrow and see if I goofed.

BTW did you test to see what would happen if the drive was not connected?

Legend
Posts: 73
Comments: 16452

With the Pre/Post I cannot get ATI to abort the BU if the BAT file fails

John, when wanting the Pre Command to exit and abort you need to add extra lines.

I fell foul of this with another issue I was working on recently and the following BAT file resolved it..

@ECHO OFF
rem testing for specific time for task execution
SET hour=%time:~0,2%
IF %hour% GEQ 9 IF %hour% LEQ 17 (GOTO RUNIT)

ECHO Wrong time to run!
exit /b 1
GOTO END

:RUNIT
ECHO Right time to run!
exit /b 0

:END

In the above, setting the exit code to 1 triggers an abort of the task, whereas setting to 0 lets the task proceed.

Note: when using this method, it is best to ensure that the Task Options > Advanced > Error handling is disabled to prevent it being repeated x times...!

Legend
Posts: 73
Comments: 16452

John, a simplified Pre Command batch file.

ConnectDrive.BAT

echo off
if not exist L:\BackupDrive1.txt goto nodrive
exit /b 0

:nodrive
exit /b 1
Forum Member
Posts: 14
Comments: 79

Enchantech wrote:

John,

On your non-working PC, try moving the batch file to the root of C: 

I'm thinking that will address security permission levels.

On my son's PC (Windows 10 Pro x64, Bitlocker on the C drive, no data partitions, e.g. just the C and whatever Windows creates for its support) placing the BAT file at the root seemed to present a security issue in that I could not edit the BAT file. I placed the BAT file in a subdirectory (C:\ATI\batch.bat) and I could then modify it. I have limited access to his PC and have not been able to test further and have been testing on my laptops and have encountered numerous other issues some not related to ATI thus this has taken me down numerous rabbit holes finding solutions for them. 

Windows 10 just applied an update to my laptop and now booting is taking 30+ minutes. After it boots up ATI could not get past the splash screen. DAMN!!!! Another darn rabbit hole.

My current thought is to get ATI working on my laptop with rotating USB drives either using the Pre/Post commands or the Windows Task Scheduler. At this time, I really don't care which method works as long as a method works. Once I get it working on my PC then I will focus on my sons PC. Currently, I'm manually kicking off backups 2-4 times a week. At this time I have a major concern about recovering on his PC. To fully test I need physical access to his PC, swap out the boot drive with a replacement test drive, recover to it and boot. He has a security requirement to run bitlocker on all drives used on the PC this has presented a whole new set of issues. 

Forum Star
Posts: 116
Comments: 2572

Hi All, not luck getting the backup on attachment of USB device - attaching on booting is not sufficient. It was worth trying.

Ian

Forum Member
Posts: 14
Comments: 79

Looks like I may be out of the loop for a few days, all of my systems now have very bad performance issues. I don't know enough about the Sysinternal tools to troubleshoot. My desktop is pegged at 100% utilization (svchost.exe is taking as much of the CPU as possible constant 40-50%) (three BSOD today), my main laptop is sometimes taking more than an hour to respond (I will be restoring to the last full ATI backup) but CPU utilization is less than 10%, my other laptop is normally slow but now slower. I'm pointing a finger at the Sept Windows update. My wife's PC is also running slower.

Forum Member
Posts: 14
Comments: 79

I just rechecked my wife's PC and it is now performing as expected. I have no idea what I did or did not do. My desktop, CPU utilization is around 50% (it has just been setting while I worked on my wife's PC). Sorry for the venting but.......

As soon as I can I will restore my main laptop and then reapply the windows update. I may be asking for trouble with this action.

Legend
Posts: 73
Comments: 16452

Not seen the Sept Windows Update on any of my computers as yet John, just the normal run of Tuesday updates etc.

Who Crashed can be useful when you are seeing BSOD's to try narrow down the culprit.

Forum Member
Posts: 14
Comments: 79

Steve - regarding Who Crashed can be useful when you are seeing BSOD's to try narrow down the culprit.

Which of their offerings have you used? It looks very interesting. The review at PCMAG looks good and a good video at https://www.youtube.com/watch?v=yNAFsSdlNpM (there are others as well).

I just downloaded the free home version, installed and ran it. It reports that I have no valid dumps and provides info how to ensure you get system dumps which I then did. Thus the next BSOD I hopefully will have a dump that this will help ID the issue.

I'm going to try other home editions offerings he has. 

Much thanks.

FYI I'm testing with your recommendation for the BAT file. I previously tried this but seeing your example I now realize that I did not do it correctly.

I tested the updated BAT file and all works well except ATI reports the return code = 1 as a failure. IMHO this should be what I would call a graceful failure, e.g. it should not be considered a failure because the run was aborted for a user known reason. BTW I was using the PRE advanced function in the Options of the BU task. 

Forum Member
Posts: 14
Comments: 79

Enchantech wrote:

John,

On your non-working PC, try moving the batch file to the root of C: 

I'm thinking that will address security permission levels.

I now have the bat files at the root of the "C" drive and it is working without problems on my test laptop (the HP, without BitLocker) and on my son's PC (with BitLocker). On my son's PC I don't have everything fully implemented but everything should be there for one of the rotating USB drives.  

Forum Member
Posts: 14
Comments: 79

All, I think I have the rotating USB drives BU working, at least it works on my test laptop. I'm now in the process of implementing it on the production system but I have limited access to it and it is about 260 miles from me. I have implemented the BU using one drive but the other drive is offsite thus I need to wait until the drives are rotated.

The current procedure uses two BAT files and the Pre/Post Advanced function in ATI. I will post more details in a few days.

Forum Member
Posts: 14
Comments: 79

Steve Smith wrote:

Not seen the Sept Windows Update on any of my computers as yet John, just the normal run of Tuesday updates etc.

Who Crashed can be useful when you are seeing BSOD's to try narrow down the culprit.

I think I've resolved the BSOD (thanks for the link to Who Crashed). I was at the point where I saw it at least twice a day. Based on the Who Crashed report I made some changes (uninstalled an application) and since then I have NOT had a BSOD. 

Legend
Posts: 73
Comments: 16452

Good to hear John.

Forum Member
Posts: 14
Comments: 79

Finally, I've completed the Backup To Rotating USB drives procedure. Attached is the latest document I've created for the procedure. Please let me know if anything is not correct or missing. 

Attachment Size
464765-153812.pdf 1.7 MB
Frequent Poster
Posts: 127
Comments: 650

John Terdik wrote:

... placing the BAT file at the root seemed to present a security issue in that I could not edit the BAT file. I placed the BAT file in a subdirectory (C:\ATI\batch.bat) and I could then modify it. ...

I've nothing of value for the topic of this thread, but for editing .bat files in the root try doing a "Run as Administrator" invocation of Notepad and point it at the .bat file in question. You should be able to save the edited .bat file.

Forum Member
Posts: 14
Comments: 79

Patrick, thanks for the tip. I've been using Textpad as my text editor mainly because it has a lot more function which makes it easier (for me) to use rather than Notepad. There are a ton of replacement text editors. On my son's laptop with only one drive and one partition, I had various issues with putting the ATI files at the "C" root level. Using the C:\ATI folder resolved all of the issues I encountered. 

I don't recall trying to edit as admin to see if it would resolve those issues, although I have admin rights as a user, at times this does not seem to be enough and I've never looked into the differences between "user with admin rights" vs "running as admin".

As an afterthought, (hindsight is almost always better) I like the idea of using a folder just because it contains everything related to ATI  and makes it cleaner.

Forum Hero
Posts: 36
Comments: 7024

John,

Very nice how to on using 2 different drives for backup alternating those drives as outlined.  Your work is appreciated as I am sure others users will find your instructions valuable.

Forum Member
Posts: 14
Comments: 79

 Enchantech - thanks!