Page 1 of 1

Scripting Environment - Please Help

Posted: Wed Mar 14, 2012 2:30 pm
by konoskoncepts
Could you please provide some details about the BA scripting environment?
i.e What can it do? What can it NOT do? How is it set? What are its limitations?

We rely heavily on scripts as part of our backup systems but have found that the BA scripting environment has become a point of failure.
Simple batch scripts which were working in version 4 and 5 are now failing to run/complete in version 6.

One of the main reasons we chose BA to deploy as our standard backup solution was because it seemed to have a powerful scripting engine which could execute all of our scripts based on the outcome of a backup. We need to call or start a variety of batch based scripts as part of our various backup strategies but they are constantly failing or not completing or just hanging. We have so much trouble with the scripting environment now that we have to bypass it entirely, defeating its purpose.

For example, our client sites all use batch scripts to update our reporter with failure/success notifications.
All of our scripts operate as desired when using scheduled tasks or a command line but fail or hang without notice from within BA.

I have noticed that the scripting environment seems to run with a blank variable set which causes failures for scripts which require system environment.
Is it possible to import or include the system or user environment?

Re: Scripting Environment - Please Help

Posted: Wed Mar 14, 2012 4:00 pm
by TimN
Hi,

It's Tim from BackupAssist. Thanks for your post.

The scripting environment in BackupAssist basically has the same limitations of a normal command-prompt window.

We have also not implemented any changes to the scripting section since versions 4 and 5 of BackupAssist.

What specific issues are you having with your scripts?

Do the same scripts execute successfully from a command-prompt?

Kind regards,

Tim.

Re: Scripting Environment - Please Help

Posted: Thu Mar 15, 2012 11:15 pm
by konoskoncepts
Hi Tim,

All of our scripts operate as desired when using scheduled tasks or a command line but fail or hang when called from within BA.

Let me give you an example...
We always set a variable "SITEID" in the system environment and refer to in several scripts. One script is a monitoring script which sends a site backup status to our server. If called through BA, the scripts fails to complete unless the SITEID is set in the BA script environment. This leads me to believe that system environment is ignored.

The curious thing is that our scripts seemed fine in earlier BA versions.

In another example, We have a script which deletes SQL exports of a certain age. This worked fine in version 4 but after upgrading to version 6, the script runs when called but no longer performs its task. BA returns an error code of 0.

Can you shed any light on this?

Cheers
Nathan

Re: Scripting Environment - Please Help

Posted: Fri Mar 16, 2012 4:22 pm
by TimN
Hi,

It's Tim again from BackupAssist.

Could I get you to send in system diagnostics for us to review the specific errors that you are getting?

To submit diagnostics:

1) Go to Contact Support (from the bottom-left corner of the BackupAssist console) -> Click on Contact Support

2) Fill out the form and ensure that the Submit system diagnostics checkbox at the bottom is checked.

If this does not work:

3) Launch the Diagnostics.exe file located in the BackupAssist install folder: C:\Program Files\BackupAssist v6\Diagnostics.exe


Kind regards,

Tim.

Re: Scripting Environment - Please Help

Posted: Wed Mar 21, 2012 11:57 am
by konoskoncepts
Hi Tim,

I've submitted the diagnostics.

Furthermore...
I collected a "SET" output from the BA script environment which shows that system variables are included during a backup.
From this, I can see that the variable SITEID is set correctly. BUT one of our scripts fails unless the variable SITEID is set in the BA script editor.

Cheers,
Nathan




Output of "SET":

----------------------------------------------------------------------------------------------------------
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Windows\system32\config\systemprofile\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=VHOST
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
LOCALAPPDATA=C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS=6
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 10 Stepping 0, AuthenticAMD
PROCESSOR_LEVEL=16
PROCESSOR_REVISION=0a00
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files\Modules
PUBLIC=C:\Users\Public
SITEID=XXX
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Windows\TEMP
TMP=C:\Windows\TEMP
USERDOMAIN=WOWS
USERNAME=VHOST$
USERPROFILE=C:\Windows\system32\config\systemprofile
windir=C:\Windows
windows_tracing_flags=3
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
----------------------------------------------------------------------------------------------------------

Re: Scripting Environment - Please Help

Posted: Wed Mar 21, 2012 12:33 pm
by konoskoncepts
Update...

I just created a new job to test scripting and called both of our scripts.
The scripts were called, executed and completed successfully as intended.

It seems that only migrated jobs are problematic.

Nathan

Re: Scripting Environment - Please Help

Posted: Tue Mar 27, 2012 3:29 pm
by konoskoncepts
Further update...

Scripts are failing again. This issue is not resolved.

Re: Scripting Environment - Please Help

Posted: Wed Mar 28, 2012 8:13 am
by konoskoncepts
I have done some debugging and found the point of failure for one of my scripts.
I discovered that mapped drives are unavailable when a script is called from BA.

Here is a "Net Use" output when called from BA...


Status Local Remote Network
-------------------------------------------------------------------------------
Unavailable L: \\192.168.1.65\C$ Microsoft Windows Network
Unavailable M: \\192.168.24.11\C$ Microsoft Windows Network
Unavailable S: \\192.168.24.1\Home Microsoft Windows Network
The command completed successfully.


These drives are persistent and always available from the host command line...

Status Local Remote Network
-------------------------------------------------------------------------------
OK L: \\192.168.1.65\C$ Microsoft Windows Network
OK M: \\192.168.24.11\C$ Microsoft Windows Network
OK S: \\192.168.24.1\Home Microsoft Windows Network
The command completed successfully.


The BA user identity is the same as the logged on user ie .\Administrator.
If I add "Net Use" to an external script, then call that from BA, The drives are still unavailable.

Re: Scripting Environment - Please Help

Posted: Wed Mar 28, 2012 6:39 pm
by TimN
Hi,

It's Tim from BackupAssist.

Sorry to hear that the problem with the scripts persists.

Please send in the latest set of diagnostics to us for the developers to look into this issue further.

To submit diagnostics:

1) Go to Contact Support (from the bottom-left corner of the BackupAssist console) -> Click on Contact Support

2) Fill out the form and ensure that the Submit system diagnostics checkbox at the bottom is checked.

If this does not work:

3) Launch the Diagnostics.exe file located in the BackupAssist install folder: C:\Program Files\BackupAssist v6\Diagnostics.exe


Kind regards,

Tim.