ev 8 SP2 - set indexes in backup mode with powershell

This issue has been solved. See solution.
JB22's picture

Hello,

I upgrade my ev environment from 7.5 SP 4 to 8 SP2.
I now want to use the powershell commands to set the vault stores and index locations in backup mode.
For the vault stores there is no problem.
To set the index location in backup mode is failing for the moment.
I try do it with another account than the ev service account. I tried with the ev service account and then everything goes well.
But I want to use another account than the ev account. The account is member of the domain admins and in ev the account is power administrator.

I would think that the account needs some extra rights to perform the action.

This is the error message I get.

Set-IndexLocationBackupMode : Unable to notify the indexing service on computer
 'evserver01.domain.com' of backup mode changes for index locations. Check that i
ndexing service is running on computer 'evserver01.domain.com' and start the serv
ice if necessary.
At line:1 char:31
+ & {set-indexlocationbackupmode  <<<< evserver01}

Anyone an idea what could be the cause?

Thanks,
JB

Scanner001's picture

You need to give the new

You need to give the new account local admin rights on the EV server so it has the permissions to manage the services

Also you need to set the backup agent services to run using the same service account

This is what is normally all that is needed

Paste up the contrnts of your .CMD file that has your powershell script so we can verify the context of the commands

JB22's picture

The account I use has domain

The account I use has domain admin rights so the account has all the rights on the ev server automatically.
I use the following line just to test in a command prompt.

powershell -psconsolefile "C:\program files\enterprise vault\evshell.psc1" -command "& {clear-indexlocationbackupmode evserver01}"

I use the following line to set the vault stores in backup mode and that works fine.
powershell -psconsolefile "c:\program files\enterprise vault\evshell.psc1" -command "& {set-vaultstorebackupmode -name 'Default upgrade group' -evservername evserver01 -evobjecttype vaultstoregroup}"

Thanks for the help.

JB

Scanner001's picture

You also need to set your

You also need to set your index locations also

Try adding this to your .cmd file

powershell -psconsolefile "c:\program files\enterprise vault\evshell.psc1" -command "& {set-IndexLocationBackupMode -EVServername evserver01}"

JB22's picture

No succes Liam. I think the

No succes Liam.

I think the instructions are correct because it works when I try it on the evserver.
On the other hand, I try to execute the cmd with the ev account credentials and that also gives the same error message.

Greets,
JB

Scanner001's picture

This may sound silly

This may sound silly but...did you verify that the service is not already in backup mode or that the index service is actually started 

JB22's picture

Liam, Thanks for the effort

Liam,

Thanks for the effort but the service is running and it is not in backup mode.
It could have been but this is not the case.

I checked the rights on the service but everything seems ok.

JB

GertjanA's picture

Add account to

Hi JB22,

Did you add the account you use to run the program in EV to the Storage Administrator group?

What happened at our location was that the pre-backup command was started by Local system, because the backup-service ran under that.
When changed to a serviceaccount, account added to local admin and to Storage Admin, it now works fine.

I use (btw) this command:
powershell.exe -PSConsole "C:\Program Files\Enterprise Vault\evshell.psc1" Set-IndexLocationBackupMode EVSERVERNAME

Works fine.

If not ok on your site, also do verify that the ntfs rights on the folder hosting the indexes has permissions for local administrators full control.

Good luck!

Thank you, Gertjan

MCSE, MCITP, MCTS Exchange 2007 SCS2007, SCS8.0
Company: www.t2.nl
Good site: www.enterprisevaultfaq.com
Good site: www.evdiscuss.net

JB22's picture

Hi Gertjan, Thanks for your

Hi Gertjan,

Thanks for your response.
The account was added to the local admin group on the server and to storage admins in enterprise vault.

The admin account didn't have full control on the index folder. I adjusted that but no luck, even with your command.

Any suggestions are welcome.
I now still use the old method of restarting the ev services (ev readonly) to backup our ev environment but would like to swicht to the new method of the powershell scripts as quickly as possible.

Thanks,
JB

JB22's picture

Hi Liam, There are 7077

Hi Liam,

There are 7077 events in the eventlog stating that there are legacy registry values in use.
It states that the new backup methode can not be used until the reistry values are removed.
I haven't removed the registry values because on my test system these values are still in place and I can set the indexes in backupmode.

If I remove the registry values, do I have to restart a service for the change to be applied?

Thanks Liam.
JB

JB22's picture

Liam, Just tried but no

Liam,

Just tried but no luck.
Do you know if there is a method of showing more error information withing the execution of powershell command?
The error message as posted above is the only thing i'm getting which isn't saying very much.
Maybe with some kind of debugging parameter it is possible to get some more information about the reason why the index location can't be set.

Thanks,
JB

JB22's picture

Opened a support case. I will

Opened a support case.
I will post the solution as this issue gets resolved.

Thanks for the help.
JB

JB22's picture

case solved. Technote

Solution

case solved.

Technote http://support.veritas.com/docs/308248 did the trick.

Regards,
JB