I wanted to open this up as a discussion thread in case people have encountered other ways to achieve this, or had feedback from customers of how they achieved this.
Unfortunately there are rare cases where a customer either does not want Snap Manager for Exchange, or cannot afford it. I’m not going to try and attempt to write a full scripted API for the Exchange VSS writer, the below script is very simple! The script is a totally disruptive way of snapshotting the mailstores relatively cleanly. I give no guarantees to the full consistency of these backups (although they should be good). If you want a full and proper backup solution, get SME!
I love SME and it breaks my heart whenever customers take it out of a config! I can't stress enough how much I think it shouldn't be a choice, but a requirement that SME is used. But still, I have to try accomodate everyone. I'd rather they bought NetApp hardware in the first place, so at least it's a start!
The following few scripts can help with this, a couple of VBscripts which will dismount and mount the Exchange stores allowing you to take a NetApp based snapshot with a batch script, and so getting a consistent backup point. I would recommend running this only once a day, and only on a system that can suffer disruption!
In the below scripts we connect to an Exchange server called “EXCHANGE”, which sits in the domain called “domain.lan”. There are 2 mailstores (”Mailbox Store” and “Public Folder Store”) inside 1 storage group (”First Storage Group”). These are easily customised, changed or added to. We don’t touch the logs volumes, we can take “dirty” snapshots directly on the filer fairly safely without any disruption or application integration really required. But you may want another process to clear down the transaction logs.
First script “ExchDismount.vbs” using VB to connect to the Exchange server and dismount the mailstores.
Set oDB = CreateObject(”CDOEXM.MailboxStoreDB”)
strDB = “CN=Mailbox Store (EXCHANGE),CN=First Storage Group,CN=InformationStore,CN=EXCHANGE,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=domain,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=lan”
oDB.DataSource.Open strDB
oDB.Dismount()
Set oPS = CreateObject(”CDOEXM.PublicStoreDB”)
strPS = “CN=Public Folder Store (EXCHANGE),CN=First Storage Group,CN=InformationStore,CN=EXCHANGE,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=domain,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=lan”
oPS.DataSource.Open strPS
oPS.Dismount()
A second VB script “ExchMount.vbs” is then used to connect to the Exchange server and remount the mailstores.
Set oDB = CreateObject(”CDOEXM.MailboxStoreDB”)
strDB = “CN=Mailbox Store (EXCHANGE),CN=First Storage Group,CN=InformationStore,CN=EXCHANGE,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=domain,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=lan”
oDB.DataSource.Open strDB
oDB.Mount()
Set oPS = CreateObject(”CDOEXM.PublicStoreDB”)
strPS = “CN=Public Folder Store (EXCHANGE),CN=First Storage Group,CN=InformationStore,CN=EXCHANGE,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=domain,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=lan”
oPS.DataSource.Open strPS
oPS.Mount()
We pull this all together around a quick snapshot batch script that will create a series of daily snaps (in this case 5). This can be run from a scheduled task daily in the night, or during a time where disruption can be tollerated. The snapshots have a prefix defined at the top, as is the database drive letter. If multiple Storage Groups are going to be snapshotted, then this script will need to be expanded on, or multiple scripts to stagger the disruption.
@echo off
REM —— begin
snapprefix=exch
dbdrive=M
echo * Create new snapshot, and rename older snapshots, deleting last one *
“C:\Program Files\NetApp\SnapDrive\sdcli.exe” snap rename -d %dbdrive% -o %snapprefix%.daily.5 -n %snapprefix%.daily.delete
“C:\Program Files\NetApp\SnapDrive\sdcli.exe” snap rename -d %dbdrive% -o %snapprefix%.daily.4 -n %snapprefix%.daily.5
“C:\Program Files\NetApp\SnapDrive\sdcli.exe” snap rename -d %dbdrive% -o %snapprefix%.daily.3 -n %snapprefix%.daily.4
“C:\Program Files\NetApp\SnapDrive\sdcli.exe” snap rename -d %dbdrive% -o %snapprefix%.daily.2 -n %snapprefix%.daily.3
“C:\Program Files\NetApp\SnapDrive\sdcli.exe” snap rename -d %dbdrive% -o %snapprefix%.daily.1 -n %snapprefix%.daily.2
ExchDismount.vbs
“C:\Program Files\NetApp\SnapDrive\sdcli.exe” snap create -s %snapprefix%.daily.1 -D %dbdrive%
ExchMount.vbs
“C:\Program Files\NetApp\SnapDrive\sdcli.exe” snap delete -d %dbdrive% -s %snapprefix%.daily.delete
REM —— end
Going on from this, I reckon it wouldn't be too difficult to script a Flex Clone and ESEUTIL verification of the database.