07-19-2022 07:02 AM
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
Solved! Go to Solution.
08-08-2022 11:51 AM
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
10-11-2022 01:17 AM
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"
07-19-2022 11:24 PM
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
07-19-2022 11:40 PM
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
07-19-2022 11:44 PM
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
07-19-2022 11:50 PM
Yes, you are right but we dont know how to create a script about indexsnapshot. Is there any sample about that
07-19-2022 11:54 PM
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
07-19-2022 11:57 PM
This TN is also very helpful:
https://www.veritas.com/content/support/en_US/article.100051446
08-08-2022 08:27 AM
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?
08-08-2022 09:01 AM - edited 08-08-2022 09:04 AM
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
08-08-2022 11:00 AM
does not work, tried 10 deferent ways.
08-08-2022 11:51 AM
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
08-08-2022 12:28 PM
Command fails with;
The script failed due to call depth overflow.
+ CategoryInfo : InvalidOperation: (0:Int32) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CallDepthOverflow
08-08-2022 12:38 PM
What is the exact syntax you have in the command line? Where is the EV install directory located?
08-08-2022 12:46 PM
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}"
08-08-2022 01:06 PM
Does the command run from an Admin CMD window? It should not be run in PowerShell window.
Typically, that error is due to something being done recursively to too many levels.
08-08-2022 01:09 PM
08-08-2022 01:59 PM
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."
08-08-2022 02:16 PM
Maybe an issue with my lab server running out of memory, I'll run it tomorrow live. Thanks for your help.
10-11-2022 01:17 AM
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"
12-28-2022 01:02 AM
thank you everybody for your answer