Comprehensive data protection for all workloads
Post Reply
zoltank
Expert
Posts: 225
Liked: 37 times
Joined: Feb 18, 2011 5:01 pm
Contact:

Custom scripts for verifying DAG in SureBackup?

Post by zoltank » Apr 15, 2012 6:39 pm

I have two Exchange 2010 mailbox DAG members I want to automatically verify using SureBackup. The problem is while the Exch2010 CAS server can be check via the included mail server script, mailbox servers don't respond on port 25. Is there any way to check a mailbox server? Is there a script I can use?

vMO
Expert
Posts: 176
Liked: 21 times
Joined: Jul 08, 2011 8:16 am
Contact:

Re: Custom scripts for verifying DAG in SureBackup?

Post by vMO » Apr 16, 2012 1:36 pm

hi
may there you can build your own powershell script to check something on your exchange server: http://www.msexchange.org/articles_tuto ... part1.html

note, that scripts will be run on backup server and accessing exchange remotly, error code to indicate success has to be 0 (zero). and user who runs the script has to have the adequate rights.

zoltank
Expert
Posts: 225
Liked: 37 times
Joined: Feb 18, 2011 5:01 pm
Contact:

Re: Custom scripts for verifying DAG in SureBackup?

Post by zoltank » Apr 16, 2012 2:20 pm

A couple questions regarding that:
- Are there any sample scripts I can start from?
- Are there any tutorials or documentation for writing verification scripts for Veeam?

vMO
Expert
Posts: 176
Liked: 21 times
Joined: Jul 08, 2011 8:16 am
Contact:

Re: Custom scripts for verifying DAG in SureBackup?

Post by vMO » Apr 16, 2012 3:07 pm

there is vmconnectiontester.exe to check different network ports than the standard ones. for scripts, there are no "samples", but you should be able to use remote powershell for example.

regarding documentation, as far as i know, there is no "official" one. ecept what i say above
vMO wrote:that scripts will be run on backup server and accessing exchange remotly, error code to indicate success has to be 0 (zero)
maybe there are some test scenarios and the scripts in the forum, try with forum/google search.

on part 4 of the above mentioned article you see some examples http://www.msexchange.org/articles_tuto ... part4.html

Vitaliy S.
Product Manager
Posts: 23003
Liked: 1558 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Custom scripts for verifying DAG in SureBackup?

Post by Vitaliy S. » Apr 16, 2012 10:32 pm

There is no documentation, but you may want to take a look a this blog post, which has a detailed description of SureBackup script creation and management: http://www.veeam.com/blog/automate-reco ... ackup.html

zoltank
Expert
Posts: 225
Liked: 37 times
Joined: Feb 18, 2011 5:01 pm
Contact:

Re: Custom scripts for verifying DAG in SureBackup?

Post by zoltank » Sep 11, 2012 8:01 pm 3 people like this post

Again, sorry to bring up an old thread, but hopefully it might help someone.

This is the PS script I use in SureBackup to see if the Exchange services are running on my mailbox servers:

REM Start-Sleep -s 60

# Start Exchange services on Mailbox servers

Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeIS)
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeSA)
Start-Service -InputObject $(Get-Service -Computer <IP> -Name MSExchangeServiceHost)

REM Start-Sleep -s 60

# Check Exchange services Status

$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeIS -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}

$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeSA -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}

$ExchSvc = (get-service -ComputerName <IP> -Name MSExchangeServiceHost -ErrorAction SilentlyContinue)
IF($ExchSvc.status -ne "Running"){$host.SetShouldExit(1)}

Exit


And the batch file which SureBackup actually runs:
powershell.exe -noninteractive -noprofile -command "& {C:\batches\exchangehub.ps1}"
EXIT /B %errorlevel%

Post Reply

Who is online

Users browsing this forum: Bing [Bot], DGrinev and 59 guests