cancel
Showing results for 
Search instead for 
Did you mean: 

EV 8.0 Using EV Management Shell to set Backup Mode

Judy_Glazier
Level 6
Partner

Has anyone successfully been able to execute a script file that would set the Vault Store Group or Index Locations into BackupMode using the Cmdlets available in EV Management Shell?

 

I have tried the CMDlets

Set-IndexLocationBackupMode .....

Set-VaultStoreBackupMode .....

 

and as long as I run them within the EV Management Shell they work great.  As soon as you try putting them in a Script file they will not run.

 

I have tried calling the C:\Program Files\Enterprise Vault\Bootstapper.exe set-IndexLocationBackupMode etc. in the script file, but nothing I have tried works.

 

I would like Backup Exec to use the prebackup and postbackup script files to set the BackupMode and clear the setting after a successful backup.

 

Judy

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

There is a section in the ReadMe file that has examples of the commands.

 

Note: Microsoft PowerShell 1.0 must be installed on your server to run these cmdlets.

The following pre-backup extract from a backup script:

  • Runs PowerShell
  • Loads the Enterprise Vault PowerShell snapin
  • Runs the set-vaultstorebackupmode cmdlet to set backup mode on all the vault stores in the vault store group called Express Vault Store Group, which is owned by the server calledserver1

powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command "& {set-vaultstorebackupmode -name 'Express Vault Store Group' -evservername server1 -evobjecttype vaultstoregroup}"

The following post-backup extract from a backup script:

  • Runs PowerShell
  • Loads the Enterprise Vault PowerShell snapin
  • Runs the clear-vaultstorebackupmode cmdlet to clear backup mode from all the vault stores in the vault store group called Express Vault Store Group, which is owned by the server called server1

powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command "& {clear-vaultstorebackupmode -name 'Express Vault Store Group' -evservername server1 -evobjecttype vaultstoregroup}"

For more detailed information about backing up Enterprise Vault, refer to the following document on the Symantec support web site: http://entsupport.symantec.com/docs/312327. 

View solution in original post

5 REPLIES 5

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

There is a section in the ReadMe file that has examples of the commands.

 

Note: Microsoft PowerShell 1.0 must be installed on your server to run these cmdlets.

The following pre-backup extract from a backup script:

  • Runs PowerShell
  • Loads the Enterprise Vault PowerShell snapin
  • Runs the set-vaultstorebackupmode cmdlet to set backup mode on all the vault stores in the vault store group called Express Vault Store Group, which is owned by the server calledserver1

powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command "& {set-vaultstorebackupmode -name 'Express Vault Store Group' -evservername server1 -evobjecttype vaultstoregroup}"

The following post-backup extract from a backup script:

  • Runs PowerShell
  • Loads the Enterprise Vault PowerShell snapin
  • Runs the clear-vaultstorebackupmode cmdlet to clear backup mode from all the vault stores in the vault store group called Express Vault Store Group, which is owned by the server called server1

powershell -psconsolefile "C:\Program Files\Enterprise Vault\EVShell.psc1" -command "& {clear-vaultstorebackupmode -name 'Express Vault Store Group' -evservername server1 -evobjecttype vaultstoregroup}"

For more detailed information about backing up Enterprise Vault, refer to the following document on the Symantec support web site: http://entsupport.symantec.com/docs/312327. 

Judy_Glazier
Level 6
Partner

Thanks Tony, exactly what I needed.

 

Doing my first EV 8.0 implementation this week and boy am I impressed with all the positive improvements in this version.

 

Judy Glazier

LAG
Not applicable

Judy,

 

I'm having the same problem as you. Do you happen to have a copy of your script that I can see and use to creat my own? Thanks in advance for your help.

 

LAG

EV_User
Not applicable
Partner Accredited

Hello Lag

 

What we had to do to have Backup Exec run a script file, we installed PSTools on the Vault Server and we actually typed the script right into the line that you were suppose to enter the path to the script file.

 

Example of what we put in the line: 

 

C:\PStools\psexec \\nyevault01 -u NYPOTEN\evaultsvc -p password cmd /c "echo . | C:\Batchfiles\Prebackup.bat"So it was actually Psexec that was calling and running the script file.  Hope this makes sense.Judy Glazier 

Kyler
Level 3
Partner Accredited

I ran into the same problem with backupexec.  The way I did it was to leave the powershell script on the EV server, and use RCMD to launch it.  But, even then it didn't work until I used the Start command to call the batch file.  For example, RCMP \\evserver start c:\batchfile.bat

 

Also, don't forget to put an exit in your batch file so that focus will come back to the backupexec media server.  There is also a stored procedure that you can launch from your script to backup the SQL databases, which is listed on the technote for backing up EV.