cancel
Showing results for 
Search instead for 
Did you mean: 

enterprise vault elastic search index snapshot automatic backup script

bunyaminkoc
Level 3

Hello,

we set up a new enterprise vault 14.2 and we create a new indexsnapshot disk but we can not create a script that automatic indexsnapshot.

we take indexsnapshot backup manually , how can we automate that.

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi MikeK-GT,

I used a .bat file with the following in it and it worked without issue.  You will need to replace the path if needed along with the correct SiteId for your environment.  You should then be able to run this as the Vault Service Account in Windows Scheduler.  

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {New-EVIndexSnapshot -SiteId "REPLACEME8A185D71384F250D1d10000evserver1" -Confirm:$False}"

Regards,

Patrick 

View solution in original post

bunyaminkoc
Level 3

Hello All

we solved that problem, we can take snapshot automatically by script.

we are using that command when we set Backup mode

 

cd "C:\Windows\SysWOW64\WindowsPowerShell\v1.0"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name FFFFF -EVServerName YYYYY -EVObjectType Site}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name VSG -EVServerName YYYYY -EVObjectType VaultStoreGroup}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name Journal15Store -EVServerName YYYYY -EVObjectType VaultStore}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name Mail15Store -EVServerName YYYYY -EVObjectType VaultStore}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "& {New-EvIndexsnapshot -EVServerName YYYYY.FFFF.com.tr -confirm:$false}"

del "T:\Enterprise Vault Stores\Journal15Store Ptn6\IgnoreArchiveBitTrigger.old"

del "N:\Enterprise Vault Stores\MailStore 15Ptn111\IgnoreArchiveBitTrigger.old"

View solution in original post

19 REPLIES 19

Marcde
Moderator
Moderator
Partner    VIP    Accredited

Hi there,

could you please elaborate on this a bit more? 

You can build a script using New-EVIndexSnapshot to create new snapshots. To get rid of older ones you can make use of the cmdlets Remove-EVIndexSnapshot and something like Get-EVIndexSnapshot -Latest:$false.

Unfortunately there is no built in automatism as of now but having this discussed with Veritas, it might come in a later release.

 

Regards

Marc

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de

bunyaminkoc
Level 3

Hi there,

Actually ve take indexsnapshot manually , no issue about that. Sometimes we run that command ( New-EVIndexSnapshot) but we need that command run on a script.

Example,

04:00 before backup mode and 08:00 after backup mode.

Between before and after mode we backup sql (05:00) and we need to take indexsnapshot at 06:00, but we can do it manually.

we need to automate that with a script , and script has to run on a scheduled time

Marcde
Moderator
Moderator
Partner    VIP    Accredited

well, you could build a script and let your backup solution execute it or simply create a task in task scheduler that runs at a specific time and executes a script for snapshot creation. 

The first one is what I'd recommend if possible but the second option should work as well. 

Regards

Marc

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de

bunyaminkoc
Level 3

Yes,  you are right but we dont know how to create a script about indexsnapshot. Is there any sample about that

Marcde
Moderator
Moderator
Partner    VIP    Accredited

The documentation from Veritas should help you with this as it also does contain some examples ;) 

Enterprise Vault™ PowerShell Cmdlets - New-EVIndexSnapshot

https://www.veritas.com/content/support/en_US/doc/96069939-151277745-0/v152101636-151277745 

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de

RITBruno
Level 3

 

This TN is also very helpful:

https://www.veritas.com/content/support/en_US/article.100051446

Infoniqa SQL AG
Switzerland

MikeK-GT
Level 4

Not very helpful. Trying also to setup a script to automate snapshots. new-indexsnapshot will not run in powershell only in EV Management Shell. How do you run a script from EVMS? 

plaudone1
Level 6
Employee

Hi,

You should be able to use a similar process as documented in https://www.veritas.com/content/support/en_US/doc/122198020-122198024-0/v35699192-122198024

The Transform-Backup.ps1 will generate the scripts required to run a backup by calling EVMS.  You can just modify the command in the brackets as needed.  

powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name FSAVaultStoreVNX -EVServerName EVServer -EVObjectType VaultStore}"

The 32-bit PowerShell must be used as the EVMS in not registered for use with 64-bit. 

Regards,

Patrick 

does not work, tried 10 deferent ways. 

Hi MikeK-GT,

I used a .bat file with the following in it and it worked without issue.  You will need to replace the path if needed along with the correct SiteId for your environment.  You should then be able to run this as the Vault Service Account in Windows Scheduler.  

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {New-EVIndexSnapshot -SiteId "REPLACEME8A185D71384F250D1d10000evserver1" -Confirm:$False}"

Regards,

Patrick 

Command fails with;

The script failed due to call depth overflow.
+ CategoryInfo : InvalidOperation: (0:Int32) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CallDepthOverflow

What is the exact syntax you have in the command line?  Where is the EV install directory located? 

EV installed on C:\Program Files (x86)\Enterprise Vault\

Run command below. 

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {New-EVIndexSnapshot -SiteId "188E26810AADE954DB1C0A247A62FEC431d10000MYEVTESTSITE" -Confirm:$False}"

Does the command run from an Admin CMD window?  It should not be run in PowerShell window.  

plaudone1_0-1659989130433.png

Typically, that error is due to something being done recursively to too many levels. 

 

MikeK-GT
Level 4

MikeKGT_0-1659989324839.png

 

The syntax looks correct.  The New-EVIndexSnapshot portion works in EVMS?  

I have tried to reproduce that error in the lab and I am not having any issues with the syntax.  

If I change the ending portion of the SiteId it returns "No such host is known"  

With an incorrect beginning it returns "The specified Site ID is not valid." 

 

 

Maybe an issue with my lab server running out of memory, I'll run it tomorrow live. Thanks for your help.

bunyaminkoc
Level 3

Hello All

we solved that problem, we can take snapshot automatically by script.

we are using that command when we set Backup mode

 

cd "C:\Windows\SysWOW64\WindowsPowerShell\v1.0"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name FFFFF -EVServerName YYYYY -EVObjectType Site}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name VSG -EVServerName YYYYY -EVObjectType VaultStoreGroup}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name Journal15Store -EVServerName YYYYY -EVObjectType VaultStore}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name Mail15Store -EVServerName YYYYY -EVObjectType VaultStore}"

.\powershell.exe -psconsolefile "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "& {New-EvIndexsnapshot -EVServerName YYYYY.FFFF.com.tr -confirm:$false}"

del "T:\Enterprise Vault Stores\Journal15Store Ptn6\IgnoreArchiveBitTrigger.old"

del "N:\Enterprise Vault Stores\MailStore 15Ptn111\IgnoreArchiveBitTrigger.old"

bunyaminkoc
Level 3

thank you everybody for your answer