Video Screencast Help

backup mode cmdlets for EV returning error code of 1 - how come?

Created: 10 Sep 2012 • Updated: 03 Oct 2012 | 6 comments
This issue has been solved. See solution.


Running EV 9.0.2 on 2008 R2.

I have a bunch of powershell cmdlets wrapped in batch files that put vault stores and indexes into backup mode.

Occasioanally they return an error code of 1 and I can't quite figure out why as they are doing what they are meant to be doing, putting the indexes and vaultstores in and out of backup mode successfully.

Here's an example:

REM - this clears the EV Indexes's Backup Mode setting

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell ^-psconsolefile ^"D:^\Program Files (x86)^\Enterprise Vault^\EVShell.psc1^" ^-command ^"^&^{Clear^-IndexLocationBackupMode ^-EVServerName XXXXX.XXXXXX.XXXXXX.XXXXXX^}^"`)"

REM - this checks whether the EV Indexes's Backup Mode has been cleared and returns an errorcode of 0 if successful, 1 if unsuccessful. A failure is logged if this check is unsuccessful

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell ^-psconsolefile ^"D:^\Program Files (x86)^\Enterprise Vault^\EVShell.psc1^" ^-command ^"^&^{Get^-IndexLocationBackupMode ^-EVServerName XXXXX.XXXXXX.XXXXXX.XXXXXX^}^"`) | find /i "False"

echo %date% %time% %errorlevel% XXXXXXXXXX_EV_postbackup.cmd >>D:\XXXXXXX_SCRIPTS\job.log

The command in bold is the one that returns an occasional error code of 1 and I can't figure out why.

When the script is run, it always returns and 7319 and 7320 event stating:

Disabling additions, deletions, and updates to the following index locations because they are in backup mode:


None of the index locations is in backup mode

Any ideas? I guess I can pipe the output to a text file to see why the command in bold is returning something unexpected. I had a read of and was wondering if there is any value in adding "-ForceClearBackupMode 1" ?

Comments 6 CommentsJump to latest comment

Nups's picture


Can you try running the same command from the Enterprise Vault directory folder? 

I remember there was some issue around this which was for 9.0.3 however might apply here as well.

Thanks and Regards, Backup Exec, BESR, Enterprise Vault

goatboy's picture


What do you mean exactly? The script does run from the EV programs folder already - D:\Program Files (x86)\Enterprise Vault

Are you saying in I need CD into that directory first?

Whenever I run the command manually, it's fine, the issue seems sort of random (below, the only error is from the job that takes read only off the vault store). Here is a log for the last week, the 1 is where the errorlevel of 1 is returned:

120904 044509 0 USCBDEVPREV117_EV_prebackup.cmd
120904 044510 0 USCBDEVPREI117_EV_prebackup.cmd
120904 060005 1 USCBDEVPOSTV117_EV_postbackup.cmd
120904 060006 0 USCBDEVPOSTI117_EV_postbackup.cmd
120905 044509 0 USCBDEVPREV117_EV_prebackup.cmd
120905 044509 0 USCBDEVPREI117_EV_prebackup.cmd
120905 060009 1 USCBDEVPOSTV117_EV_postbackup.cmd
120905 060011 0 USCBDEVPOSTI117_EV_postbackup.cmd
120906 044502 0 USCBDEVPREV117_EV_prebackup.cmd
120906 044502 0 USCBDEVPREI117_EV_prebackup.cmd
120906 060008 1 USCBDEVPOSTV117_EV_postbackup.cmd
120906 060008 0 USCBDEVPOSTI117_EV_postbackup.cmd
120907 044504 0 USCBDEVPREI117_EV_prebackup.cmd
120907 044503 0 USCBDEVPREV117_EV_prebackup.cmd
120907 082604 1 USCBDEVPOSTV117_EV_postbackup.cmd
120907 082605 0 USCBDEVPOSTI117_EV_postbackup.cmd
120909 044503 0 USCBDEVPREV117_EV_prebackup.cmd
120909 044504 0 USCBDEVPREI117_EV_prebackup.cmd
120909 070517 1 USCBDEVPOSTV117_EV_postbackup.cmd
120909 070518 0 USCBDEVPOSTI117_EV_postbackup.cmd
120910 044516 0 USCBDEVPREV117_EV_prebackup.cmd
120910 044519 0 USCBDEVPREI117_EV_prebackup.cmd
120910 060003 1 USCBDEVPOSTV117_EV_postbackup.cmd
120910 060004 0 USCBDEVPOSTI117_EV_postbackup.cmd

Nups's picture

Yes I meant to CD into the directory. In the meanwhile am trying to search for the case where I had seen similar issue.

Thanks and Regards, Backup Exec, BESR, Enterprise Vault

Rob.Wilcox's picture

Is this still an issue?

What happens in the event log at the time that the script runs?

goatboy's picture

It seems to have sorted it out since I adjusted some of the job timings, I think the issue was caused by multiple EV servers using the same vault store, and the jobs to clear vault store running at the same time on multiple servers. Thanks for the follow up.