Custom scripts for verifying DAG in SureBackup?

#1 VM Backup : Modern Data Protection for VMware vSphere and Microsoft Hyper-V

Custom scripts for verifying DAG in SureBackup?

Postby zoltank » Sun 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?
zoltank
Enthusiast
 
Posts: 80
Liked: 18 times
Joined: Fri Feb 18, 2011 5:01 pm

Re: Custom scripts for verifying DAG in SureBackup?

Postby vMO » Mon 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.
vMO
Veeam Software
 
Posts: 111
Liked: 9 times
Joined: Fri Jul 08, 2011 8:16 am

Re: Custom scripts for verifying DAG in SureBackup?

Postby zoltank » Mon 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?
zoltank
Enthusiast
 
Posts: 80
Liked: 18 times
Joined: Fri Feb 18, 2011 5:01 pm

Re: Custom scripts for verifying DAG in SureBackup?

Postby vMO » Mon 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
vMO
Veeam Software
 
Posts: 111
Liked: 9 times
Joined: Fri Jul 08, 2011 8:16 am

Re: Custom scripts for verifying DAG in SureBackup?

Postby Vitaliy S. » Mon 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
Vitaliy S.
Product Manager
 
Posts: 8196
Liked: 190 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Custom scripts for verifying DAG in SureBackup?

Postby zoltank » Tue 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%
zoltank
Enthusiast
 
Posts: 80
Liked: 18 times
Joined: Fri Feb 18, 2011 5:01 pm


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot], foggy, Giacomo_N, maxc, Tat and 23 guests