02-08-2016 05:49 PM
im running the trial version of SSR 2013 R2 on windows 10.
I created a small .bat script that simply puts the computer to sleep. I set SSR to run this script after recvoverypoint is created.
My SSR creates the backup on a NAS drive. The issue is that it seems that once the recoverypoint is completed, SSR needs a few more seconds before it can finalize/close the backup file it was writing. But as it is, SSR calls the script before its done writing the backup file. hence, the NAS ends up having an incomplete backup file with a .tmp extension.
I updated my .bat script to have a timer so that when ran, it gives a timer of 60 sec before the next command is executed to put the computer in standy by. This script runs fine if ran by itself (double clicking on it). However when the SSR calls this script, the computer goes to sleep instantly, the timer part doesnt run for some off reason. I tried increasing the timeout setting for the script in the SSR settings but that didnt help.
Any ideas why this is happening?
here is my batch script:
TIMEOUT /T 60 /NOBREAK
C:\Windows\swoff.exe -e
02-09-2016 03:04 AM
Do you run it as as post oder after script?
02-09-2016 04:36 AM
@Mark
not sure what you are asking when you say " post Oder"?
i configured the script in the "commands" setting on my backup task. There are thre commands you can do for a backup if I recall. I'm setting the script in the post recovery point creation
.
thanks
02-09-2016 09:59 PM
Sorry "oder" means or in German ;)
Hm, try this one:
start /w TIMEOUT /T 60 /NOBREAK
02-10-2016 12:11 PM
@ Mark
Thanks but that did not help. The computer still goes to sleep instantly when SSR calls that script.This is really strange.
Anyways heres the error i see on the screen when i wake up the computer from standby.
Note that in the settings of the backup, the timout value for the script is set to the defautl of 60 seconds.
02-10-2016 12:28 PM
UPDATE.
Upon further looking it seems that the script is indeed run with the correct TIMEOUT / PAUSE function. However, it looks like that SSR waits for this script to complete before finishes writing the backup V2i file. While the script is running, SSR displays:
In the screen shot you can see that it says "running external program" While this is happening, the backup file still has not been finalized and it has a .tmp extension. So once the computer sleep command kicks in from the script, SSR doesnt get a change to finalize the backup file name to .V2i hence the backup file is not complete.
Any idea?
02-10-2016 02:35 PM
Have you increased the timeout for the job yet?
02-10-2016 03:54 PM
Increasing the timeout in SSR backup job settings has no affect.
02-11-2016 03:16 AM
Maybe swoff.exe is blocking the batchfile. Try this script and increase the timeout to a value greater then 60 seconds.
start /w TIMEOUT /T 60 /NOBREAK
start C:\Windows\swoff.exe -e
02-11-2016 04:29 AM
Well if I run my script by itself it functions fine. Swoff.exe triggers after the 60 seconds . But when SSR calls the script, as I mentioned, the timer still seems to to work however SSR doesn't finish writing the backup file until the script and completed. By that time the computer has gone in standby and it's too late for SSR to complete the back file. This's a flaw in SSR script running no mechanism.
thanks for your help.
02-11-2016 07:10 AM
This is something that I can test here.
I'm not familiar with swoff.exe - where can I get a copy of this to test with?
02-11-2016 07:21 AM
@Chris
Here you go. Thanks
http://external.informer.com/airytec.com/en%2Fswitch-off
02-12-2016 12:50 AM
I see similar results here and the behaviour does not seem right to me.
I have raised this internally so I will keep you posted with the feedback I receive. I'll be out of office for a few days after today so I may not get back to you until later next week.
02-12-2016 06:50 AM
@Chris
Thanks.
02-16-2016 11:29 PM
Here is a workaround using Windows Scripting Host.
E:\xtest\xsleep.cmd -> Batch file for SSR, start xsleep1.vbs
E:\xtest\xlsleep1.vbs -> Start xsleep2.vbs as separate instance in Background. So the control go back to the cmd file and the cmd file can finish.
E:\xtest\xsleep2.vbs -> Create a pause for SSR to finish the SSR job and start swoff.exe -e
E:\xtest\swoff.exe -> Portable version of swoff.exe
1. xsleep.cmd
E:\xtest\xsleep1.vbs
2. xsleep1.vbs
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
'Start in Background
WshShell.Run "wscript.exe E:\xtest\xsleep2.vbs" , 0
3. xsleep2.vbs
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
wscript.sleep(60000) ' pause 60 seconds to give SSR time to finish the job
WshShell.Run "E:\xtest\swoff.exe -e" , 0
---------------
Hope this helps.
02-17-2016 12:23 PM
Thanks. That looks a bit too much work for what i had in mind. I'm sure it work :)
For now, what i've done as a work around is setup a scheduled task, which executes 30 min after the computer wakes up from sleep to do a SSR backup. The SSR backup only takes about 20 min to complete so theres a buffer of 10 min and then the computer goes back to sleep.
03-03-2016 08:45 AM
In case everything works fine now, may I ask you to mark this post as solved?
03-03-2016 08:49 AM
Markus,
This is not fixed (not from my point of view anyway).
I have raised this internally and am still waiting on a final decision on this. It looks like something in the code is not working correctly..... but am still waiting on our engineering team to confirm. I will update here once I get a definitive answer.
03-03-2016 08:50 AM
Perfect, thanks Chris. I wasn't aware of this.
04-07-2016 03:34 AM
Chris, any updates here?