Note i: This was an experiment. I’m not actually
recommending configuring your backup this way. For a recommendation, see Lab 2!
Note ii: 30 days hourly snapshots = 720 snapshots
(this is okay for ONTAP 9.4+ where we can do up to 1023 snapshots but destroys
the 255 limit in ONTAP 9.3 and earlier.) Where you're not purging logs snapshots, remember there is always 2 snapshots for each logs LUN backup.
Note iii: I was lazy to do screenshots in SnapCenter,
but if you know your way around SnapCenter, hopefully the descriptions make
sense.
Image: 7 days active copies and 30 days passive copies
(no logs)
1: Create Backup Policies
1.1: Create policy for
7 days
Settings -> Policies -> Microsoft Exchange
Server -> + New
New Exchange server Backup Policy
(1) Name
Policy name = active copies
Next
(2) Backup Type
Choose backup type:
Full and log backup
Database Availability Group Settings
Untick: “Back up active copies”
Tick: “Backup up copies on servers to be selected
during backup job creation time”
Schedule Frequency:
Hourly
Next
(3) Retention
Retention settings for up-to-the-minute restore
operation:
Choose: Keep log backups for last 7 days
Full backup retention settings:
On demand: Keep Snapshot copies for 7 days
Hourly: Keep Snapshot copies for 7 days
Next
(4) Replication
Next
(5) Script
Next
(6) Summary
Finish
1.2: Create policy for
30 days (logs for 7 days)
Settings -> Policies -> Microsoft Exchange
Server -> + New
New Exchange server Backup Policy
(1) Name
Policy name = passive copies
Next
(2) Backup Type
Choose backup type:
Full and log backup
Database Availability Group Settings
Untick: “Back up active copies”
Tick: “Backup up copies on servers to be selected
during backup job creation time”
Schedule Frequency:
Hourly
Next
(3) Retention
Retention settings for up-to-the-minute restore
operation:
Choose: Keep log backups for last 7 days*
*This doesn’t mean you’ll only have 7 days log
snapshots.
Full backup retention settings:
On demand: Keep Snapshot copies for 30 days
Hourly: Keep Snapshot copies for 30 days
Next
(4) Replication
Next
(5) Script
Next
(6) Summary
Finish
2: Create a Resource
Groups
Create 2 resource groups:
Resource Group 1 for: active servers
Resource Group 2 for: Passive copies
Note 1: You could create a resource group per DB if
you wanted. Most granular would be per DB per mailbox server.
Note 2: For SMBR Single-File restore standard functionality
with SnapCenter, you need to point SMBR at the Mailbox Server which has the Active
Copy of the database you want to restore from (you can still restore from
non-Active copy by manually flexcloning a snapshot and mounting to your SMBR
server.)
2.1: Resource Group: active
servers
(1) Provide a name and
tags for the resource group
Name = active servers
Next
(2) Select the resources
to protect, group and tag:
Resource Type = Databases
Database Availability Group = All
Selected Resources = DB1, DB2, DB3, DB4, DB5
Next
(3) Select one or more
policies and configure schedules
Policy = active copies
Select one or more backup servers = MB1, MB2
Configure schedules for selected policies = Hourly;
repeat every 1 hours
Next
(4) Notification
Next
(5) Summary
Finish
2.2: Resource Group: Passive
Copies
(1) Provide a name and
tags for the resource group
Name = Passive Copies
Next
(2) Select the
resources to protect, group and tag:
Resource Type = Databases
Database Availability Group = All
Selected Resources = DB1, DB2, DB3, DB4, DB5
Next
(3) Select one or more
policies and configure schedules
Policy = passive copies
Select one or more backup servers = MB3
Configure schedules for selected policies = Hourly;
repeat every 1 hours
Next
(4) Notification
Next
(5) Summary
Finish
3: Logs LUN Volume Snapshots Tidy Up Script
Snapshot tidy up script will need the DataONTAP
PowerShell toolkit installed on say your SnapCenter server. You don’t use the
pre/post-backup functionality in SnapCenter. Just create a scheduled task to
purge the logs snapshots as required.
I wrote a script ages ago (time flies, that’s nearly 6
years ago) that does this tidy up function - http://www.cosonok.com/2013/12/powershell-script-to-delete-aged.html.
If I get time, I’ll rework it for a future blog post.
4: SMBR Restores
4.1: From active
databases
Double-click ‘Single Mailbox Recovery’
SnapCenter authentication
Base URL: https://snapcenter.lab.com:8146
User name: LAB\SCEADMIN
Password: ********
Exch Server: {Mailbox server that has the active
database on which you want to recover}
OK
Backup Selection
Database Name: DBx
tick/untick - Backups new than {date}
tick/untick - Backups older than {date}
LOAD
Select the backup you want to restore from and
then click Mount/Launch
Source Selection
EDB Path = \\MBx\c$\scmmpt\mpdisk000xx\DBx\DBx.edb
Log File Path = \\MBx\c$\scmmpt\mpdisk000xy\DBx\Logs
Temporary File Path = C:\User\USER\AppData\Local\Temp\2\Single
Mailbox Recovery
Finish
File > Exit ... need to authenticate to
SnapCenter again to do the dismount
4.2: From passive
copies (> 7 days) - using iSCSI
Prerequisites:
- The SMBR/recovery server needs iSCSI IPs
- iSCSI Initator enabled and configured to connect to
ONTAP SVM
- iGroup for the SMBR/recovery server created on the
ONTAP SVM
::> igroup show -igroup
iqn.1991-05.com.microsoft:mb3.demo.com
Vserver
= svm2
Igroup
= iqn.1991-05.com.microsoft:mb3.demo.com
Protocol
= iscsi
OS Type
= windows
Initiators =
iqn.1991-05.com.microsoft:mb3.demo.com
Recovery steps:
1) Flexclone from required database snapshot
::> volume clone create -flexclone
mb3_db3__smbr_restore -vserver svm2 -type RW -parent-volume vol_N3DB3
-parent-snapshot "Passive Copies_mb3_10-24-2019_14.46.43.7866"
2) Present LUN to SMBR/recovery server
::> lun show -volume
mb3_db3__smbr_restore -vserver svm2
::> lun map -vserver svm2 -path
/vol/mb3_db3__smbr_restore/lun_N3DB3 -igroup
iqn.1991-05.com.microsoft:mb1.demo.com -lun-id 13
3) Compmgmt.msc
- Rescan Disks
- Online the disk
- Give it a drive letter (like R for recovery)
4) SMBR
- SnapCenter authentication - Cancel
- File > Open Source:
EDB Path = R:\DB3\DB3.edb
Log File Path =
Temporary File Path = C:\User\USER\AppData\Local\Temp\2\Single
Mailbox Recovery
Finish
Continue without logs OK
- File > Open\Create Target > Open
Target Exchange Server
Select Target: All Mailboxes (on-premise)
Domain Controller: DC1
Server Name: MB1 {doesn’t really matter which
mailbox server}
Leave ticked - Connect to Public Folder
Leave ticked - Connect using Autodiscover
Leave ticked - Connect using Outlook Anywhere
Next >
Close
5) Do your restore
6) SMBR
Target: Close Store
Sources: Close All Stores
7) Unpresent the LUN:
::> lun unmap -vserver svm2 -path
/vol/mb3_db3__smbr_restore/lun_N3DB3 -igroup
iqn.1991-05.com.microsoft:mb1.demo.com
8) Get rid of the flexclone:
::> volume offline -vserver svm2
-volume mb3_db3__smbr_restore
::> volume delete -vserver svm2
-volume mb3_db3__smbr_restore
Final note: Time depending - I’ll write a PowerShell
tool that will make mounting of DBs from snapshots to an SMBR server more
automated/less manual.
Comments
Post a Comment