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

Custom scripts for verifying DAG in SureBackup?

Post by zoltank »

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 »

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: 229
Liked: 41 times
Joined: Feb 18, 2011 5:01 pm
Contact:

Re: Custom scripts for verifying DAG in SureBackup?

Post by zoltank »

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 »

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.
VP, Product Management
Posts: 27055
Liked: 2710 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. »

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: 229
Liked: 41 times
Joined: Feb 18, 2011 5:01 pm
Contact:

Re: Custom scripts for verifying DAG in SureBackup?

Post by zoltank » 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: restore-helper and 251 guests