Application aware + Pre-freeze script?

Availability for the Always-On Enterprise

Application aware + Pre-freeze script?

Veeam Logoby masonit » Wed Nov 30, 2016 3:15 pm

Hi

I am a bit confused.. Is it possible to have Required success on application aware and also run Pre-freeze script on the same vm? Looks like you are forced to quiescence if you want to run Pre-freeze script?
I want to run a script before backup starts that check DAG cluster status (placement of DAG databases). If placement is not as it should the backup should fail.

\Masonit
masonit
Service Provider
 
Posts: 141
Liked: 10 times
Joined: Tue Oct 09, 2012 2:30 pm
Full Name: Magnus Andersson

Re: Application aware + Pre-freeze script?

Veeam Logoby foggy » Wed Nov 30, 2016 4:44 pm

Magnus, you should probably use these scripts.
foggy
Veeam Software
 
Posts: 15078
Liked: 1110 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Re: Application aware + Pre-freeze script?

Veeam Logoby masonit » Thu Dec 01, 2016 9:07 am

Yes it is thoose I am referring to...

Is it possible to combine Veeam application aware backup (Exchange VSS) with Pre-freeze script on same VM?
masonit
Service Provider
 
Posts: 141
Liked: 10 times
Joined: Tue Oct 09, 2012 2:30 pm
Full Name: Magnus Andersson

Re: Application aware + Pre-freeze script?

Veeam Logoby Vitaliy S. » Thu Dec 01, 2016 10:41 am

Yes, that's possible. The scripts we are discussing are triggered by Veeam itself and do not depend on VMware Tools Quiescence (it has its own scripts too though).
Vitaliy S.
Veeam Software
 
Posts: 19767
Liked: 1120 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Application aware + Pre-freeze script?

Veeam Logoby masonit » Thu Dec 01, 2016 1:35 pm

Ok thanks!

Any reason why you don't support powershell script?

\Masonit
masonit
Service Provider
 
Posts: 141
Liked: 10 times
Joined: Tue Oct 09, 2012 2:30 pm
Full Name: Magnus Andersson

Re: Application aware + Pre-freeze script?

Veeam Logoby masonit » Thu Dec 01, 2016 2:35 pm

Really struggeling combining cmd with powershell and exit code. I am just doing some tests that checks if notepad is started or not.

This one works as expected. Job fails because exit code is 2.
Code: Select all
@ECHO OFF
set veeamtest=2
EXIT /B %veeamtest%


This one does not work correctly. It always returns 0. Even though notepad is not started in vm.
Code: Select all
@ECHO OFF
set veeamtest=(powershell -Command "& {$check = Get-Process -Name notepad -ErrorAction SilentlyContinue; if($check) ` {0} ` else ` {1};}")
EXIT /B %veeamtest%


If I run the command manually inside vm they work:
Code: Select all
C:\Users\Administrator>set veeamtest=(powershell -Command "& {$check = Get-Proce
ss -Name notepad -ErrorAction SilentlyContinue; if($check) ` {0} ` else ` {1};}"
)

C:\Users\Administrator>%veeamtest%
1

Maybe I am approaching it the wrong way, help.. :)

\Masonit
masonit
Service Provider
 
Posts: 141
Liked: 10 times
Joined: Tue Oct 09, 2012 2:30 pm
Full Name: Magnus Andersson

Re: Application aware + Pre-freeze script?

Veeam Logoby Vitaliy S. » Thu Dec 01, 2016 2:56 pm

masonit wrote:Any reason why you don't support powershell script?

Don't know technical details on this, but maybe there were just a handful of requests for that.

masonit wrote:If I run the command manually inside vm they work

Maybe there is an issue with an account (permissions) under which these scripts are triggered? Does AAP account specified in the job settings have permissions to launch these scripts?
Vitaliy S.
Veeam Software
 
Posts: 19767
Liked: 1120 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Application aware + Pre-freeze script?

Veeam Logoby masonit » Mon Dec 05, 2016 10:08 am

Account is local administrator. (builtin administrator)

\Masonit
masonit
Service Provider
 
Posts: 141
Liked: 10 times
Joined: Tue Oct 09, 2012 2:30 pm
Full Name: Magnus Andersson

Re: Application aware + Pre-freeze script?

Veeam Logoby Vitaliy S. » Mon Dec 05, 2016 11:42 am

Can you try to launch some simple script like opening Paint to verify that this is not a permission issue and then proceed with your own script?
Vitaliy S.
Veeam Software
 
Posts: 19767
Liked: 1120 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot] and 71 guests