cancel
Showing results for 
Search instead for 
Did you mean: 

backup mode set and clear powershell scripts as part of EV VM backups

Merv
Level 6
Partner

EV is currently being backed up by NBU as part of a VMware policy.

I understand you would need special permissions however as there is no agent in the VM thus there is no backup account so to speak  to grant the EV permissions too.

Vmware basically has 2 bat files to put ev into backup mode but without the permissions its not going to work C:\Windows\pre-freeze-script.bat /C:\Windows\post-thaw-script.bat

After some googling I found 2 ways :

1.using a trigger in task sceduler combined with customer event logging :- https://www.reddit.com/r/Veeam/comments/72r50f/prepost_backup_script_problems/ 

2.powershell encrypted passwords:-  https://interworks.com/blog/trhymer/2013/07/08/powershell-how-encrypt-and-store-credentials-securely...

Just curious what approach in general is used to put ev into backup mode in your environment ( running EV as a vm)

Thanks!

1 REPLY 1

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello Merv,

I use scheduled tasks on the VM to set/clear backup mode (using a batch file which has the powershell commands). If you backup EV in a dedicated timeframe, you should be able to schedule the tasks accordingly.

set:

c:\WINDOWS\SysWow64\windowspowershell\v1.0\powershell -psconsolefile "D:\SEV\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name 'VaultStoreName' -EVServerName EVSERVERNAME -EVObjectType VaultStore}"

clear:

c:\WINDOWS\SysWow64\windowspowershell\v1.0\powershell -psconsolefile "D:\SEV\EVShell.psc1" -command "& {Clear-VaultStoreBackupMode -Name 'VaultStoreName' -EVServerName EVSERVERNAME -EVObjectType VaultStore}"

If you need to use a triggerfile (because backup doesn't change the archive attribute), add below lines in the 'set' batch file (at the end, so set backup first, then write triggerfile)

ECHO > "\\storagelocation\partition\ignorearchivebittrigger.txt"

 

 

Regards. Gertjan