Issues with PRE or POST scripts

Availability for the Always-On Enterprise

Issues with PRE or POST scripts

Veeam Logoby BHB3805 » Tue Mar 14, 2017 12:43 am

3 servers - SQL (EVDB01), Enterprise Vault (vault) and Discovery Acelerator (EVDA01)
Created two backup jobs - DB_BACKUP and APP_BACKUP
Created to batch scripts - one to delete trigger files and set backup mode, the other to create trigger file and clear backup mode.

Backup job settings:
DB_BACKUP - Advanced Settings - Scripts - Run the following script before the job - D:\SCRIPTS\SET-EV-BackupMode.bat
SET-EV-BackupMode.bat:
DEL "\\EV1\E$\Enterprise Vault Stores\EV Store 0 Partition 0\ignorearchivebittrigger.txt"
DEL "\\EV1\F$\Enterprise Vault Stores\Partition1\ignorearchivebittrigger.txt"
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell -PSConsole "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "& {set-IndexLocationBackupMode -EVServerName vault -EVSiteName EVVault}"
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell -PSConsole "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "& {set-VaultStoreBackupMode -Name EVVault -EVServerName vault -EVObjectType Site}"

Backup job settings:
APP_BACKUP - Advanced Settings - Scripts - Run the following script after the job - D:\SCRIPTS\CLEAR-EV-BackupMode.bat
CLEAR-EV-BackupMode.bat
ECHO Trigger > "\\EV1\E$\Enterprise Vault Stores\EV Store 0 Partition 0\ignorearchivebittrigger.txt"
ECHO Trigger > "\\EV1\F$\Enterprise Vault Stores\Partition1\ignorearchivebittrigger.txt"
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell -PSConsole "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "& {clear-IndexLocationBackupMode -EVServerName vault -EVSiteName EVVault}"
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell -PSConsole "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "& {clear-VaultStoreBackupMode -Name EVVault -EVServerName vault -EVObjectType Site}"

The scripts run fine if run manually or through Task Scheduler, but not via the job settings. Any suggestions?
BHB3805
Influencer
 
Posts: 22
Liked: 1 time
Joined: Fri Nov 04, 2011 1:45 pm
Full Name: Dan Andryszak

Re: Issues with PRE or POST scripts

Veeam Logoby jmmarton » Tue Mar 14, 2017 1:40 am

I see the script is set to delete files from shares on EV1. What account is used to start the Veeam services? That's the account which will run the script if it's running on the backup server via the scripts portion of the advanced storage settings in the job. If the account doesn't have rights then that explains what you're seeing. Honestly what may be better is to run the scripts as part of Application-aware Image Processing in guest itself for EV1 so that you're just deleting local files.

Joe
jmmarton
Veeam Software
 
Posts: 719
Liked: 85 times
Joined: Tue Nov 17, 2015 2:38 am
Location: Chicago, IL
Full Name: Joe Marton


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Google [Bot] and 45 guests