High Availability and Disaster Recovery for SharePoint Technologies
Joel Olesonhttp://blogs.msdn.com/joelo
Sr. Technical Product Manager
Microsoft Corporation
IW316
Session Objectives And Takeaways• Backup/Restore Options• Disaster recovery methods• High Availability Options
– Third Party Backup & High Availability Products
Content Recovery Disaster Recovery
Backup and Restore Types
• End user driven• Accidental
update or deletion
• Frequent and small-scale
Farm or database restoreHardware failure or disasterHardware migration or replacement
High Availability
Minimize downtimeLarge amounts of dataRedundancyAdditional hardware
Microsoft Confidential
Content RecoverySolutions
Recycle Bin
Versioning
SQL DB Snapshots
Web Delete Event
Mostly end-user driven and sometimes admin
Microsoft Confidential
Recycle Bin
End user drivenSupports lists, doc libs, folders, docs, and itemsSecurity trimmed2 stages
End UserAdmin
Site collection level
“I just deleted my deck and my presentation is in
an hour!”
Microsoft Confidential
Recycle BinTwo Stages
1st stage: end user deletes file/itemAppears in end user & site collection recycle binEnd user or site coll admin can restore
2nd stage: end user empties recycle binAppears in site collection recycle binSite collection admin can restore
Microsoft Confidential
Recycle BinSpecial Features
Quotas1st stage counts for site collection quota2nd stage is part of “recycle bin quota”
Adds 50% by default
Auto-delete ServicePermanently deletes items (1st or 2nd stage) that have been deleted for more than X days30 days by default
Microsoft Confidential
Versioning
Pros:Support both list item and document versioningEnd users can retrieve earlier versions
Cons: Versions count towards site quotaFunctionality needs to be turned on per list (default no)No support for Folder, Web and Site
“I made some changes but now I want to go back to a previous version!”
Microsoft Confidential
SQL Database SnapshotsSQL 2005 feature
Focused on preventing end user error
Not a backup or high availability solution
Record is changed in current DB, original value for that record is copied
Allows you to retrieve data from snapshot point
Efficient space usage
Recently posted KB Article: http://support.microsoft.com/?id=929649
Microsoft Confidential
Web Delete Event
SharePoint Object Model allows developer to custom build backup solutions at the “web delete” event Sample: MS IT Site Delete Capture 1.0http://www.codeplex.com/governanceSPWebEventReceiver.WebDeleting
“There’s no recycle bin for sites!”
“I deleted my site, but now I want it back!”
Site ownerdeletes site
Web Deletingevent fired
Automaticallybackup the site
Microsoft Confidential
Web Delete EventPro:
ExtensibleSample available at: http://www.codeplex.com/governance
Con:No out-of-box solution
Over 1000
Downloads
Microsoft Confidential
Migrate a Site
Content Migration: replaces smigrate.exeSTSADM –o export –url <url> -f mysite.cmpSTSADM –o import –url <url> -f mysite.cmp
Public file format to represent siteAdditional options available via the Object Model
Fine-grained scope selection (SPWeb SPListItem)Incremental migration (since given change token)
Limitations:Only migrates site level and belowNot full fidelity: Cannot migrate workflow, alerts, features, solutions, recycle bin state
“I want to move my site to another farm!”“What happened to Smigrate?”
Microsoft Confidential
Migrate a Site Collection
STSADM –o backup –url <url>
Pros:Large scale content and security backup at site collection levelNew read-only lock to prevent potential inconsistencies
Cons:Performance-sensitive operationNot ideal for frequent large backups on busy site collections
“I want to backup my site collection and migrate it to a different Content Database!”
Content Recovery Disaster Recovery
Backup and Restore Types
• End user errors• Accidental
update or deletion
• Frequent and small-scale
Farm or database restoreHardware failure or disasterHardware migration or replacement
High Availability
Minimize downtimeLarge amounts of dataRedundancyAdditional hardware
Microsoft Confidential
Disaster RecoverySolutions
SharePoint Backup/Restore
SQL backup and restore
3rd party solutions
Use when hardware fails, and as a last resort for service level agreement.
Microsoft Confidential
“I have a small to medium deployment. Do you have anything for me out of the box?
SharePoint Backup/Restore
Our recommended solution for small-medium deployments!
Yes!Out of the box backup/restore
UI and command line for central administrators
SharePoint Backup/RestoreHow it works
Config DB
File Server
Farm
Content DB
SSP DB
SearchIndex
Content DB
Central Admin Console
SQL Backup/Restore
Full Backup
Differential
Microsoft Confidential
Out of the Box UI and command line access for Central Administrator
‘Hooks up’ SharePoint databases and search index on Restore
Supports Full and Differential backup
Backs up the search index
Extensible framework for 3rd party applications
SharePoint Backup/RestoreDetails
Microsoft Confidential
Use the command line with Windows Task Scheduler for scheduled backups
Backs up content databases and search indexYou must manually backup front end filesWe recommend you keep images of your web front ends
High restore time Low availability
SharePoint Backup/RestoreLimitations
Microsoft Confidential
SQL-Only Backup/Restore
Pros:Reuse existing technology and processesNon-application specific
Cons:Post-restore reattachment and clean upSearch index must be backed up separately via SharePoint backup
“My SQL servers are managed by a separate organization or data center from my SharePoint
installations.”
Microsoft Confidential
Solution for each scenarioFor Disaster Recovery:
To create a mirror farm:Use stsadm –o backup/restore
To migrate a site collection:Use stsadm –o backup http://server/site
To migrate a site/list/library/item:Use stsadm –o export/import for sitesUse Site Manager within Site collection
Microsoft Confidential
3rd Party Backup Tools
What to look for in a 3rd party solutionDoes it back up the Search Index or SSP?Does it require post-restore manual work
SharePoint integration with VSS frameworkEasier for 3rd parties to write custom backup/restore toolsEntire server (search index is included)Only supports catastrophic overwrite scenario (not migration)
“I want to use a custom or 3rd party tool to backup/restore my farm! Does SharePoint support
that?”
Microsoft Confidential
3rd Party Backup Tools“As companies move to SharePoint, one likely impact will be a transition from backing up lots of files housed in shared file systems to backing up monolithic databases. As might be expected, Microsoft provides some basic functional tools for backup, but to effectively manage SharePoint data most organizations will turn to third party tools.”From Computerworld – Jan 23, 2007
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9008906
Microsoft Confidential
3rd Party Backup ToolsCommVault SharePoint Solutions
Data Protection – item level restore, database restore, front end files including web part assemblies and IIS configReplication – move data across servers, support for snapshot recoveryData Resource Management – monitor and manage disk usage, including archives, backup copies, and replication copies Etc.
http://www.commvault.com/solutions/sharepoint/
Microsoft Confidential
3rd Party Backup ToolsAvePoint – DocAve 4.1
Enterprise Backup – data compression, item level restoreContent Manager – copy live contents across sites, servers, and farmsArchiver – complete archive solutionEtc.http://www.avepoint.com/products/DocAve4_0.htm
Microsoft Confidential
3rd Party ToolsNeverFail
Providing End-to-End High Availability and Disaster Recovery for SharePoint EnvironmentsNeverfail Low Bandwidth Module — a data compression tool — is available to optimize and reduce the amount of data that is transmitted between the serversEtc. http://www.neverfailgroup.com/products/app-modules/sharepoint.aspx
Microsoft Confidential
Microsoft Data Protection Manger (DPM)Part of System Center
Beta 2 release supports WSS 3.0 and SharePoint Server 2007
Uses SharePoint VSS writer, Import/Export to backup and restore SharePoint
Can restore servers to individual items
Use a recovery server in order to extract item level data from their VSS backups
Has integrated UI experience for disk based and tape backupshttp://www.microsoft.com/systemcenter/dpm/default.mspx
Content Recovery Disaster Recovery
Backup and Restore Types
• End user errors• Accidental
update or deletion
• Frequent and small-scale
Farm or database restoreHardware failure or disasterHardware migration or replacement
High Availability
Minimize downtimeLarge amounts of dataRedundancyAdditional hardware
Microsoft Confidential
High AvailabilitySolutions
SQL 2005Database Mirroring and Log ShippingSQL Clustering
Microsoft Confidential
Database MirroringImplemented on a per database level
Transaction logs sent from principle to mirror
Provides a “warm” standby in case of failure
Principal and mirror must be separate SQL 2005 SP1 servers (Enterprise or Standard)
Optional “witness” server to monitor primary and mirror to ensure both are working
Automatic failover - on failure the witness will turn the mirror into the principle
WSS v3 Whitepaper coming soon
Microsoft Confidential
Database MirroringThree modes that can be used:
High Availability: synchronizes transaction writes on both servers and enables automated failover (requires a witness server).High Protection: synchronizes transaction writes on both servers, manual failover. High Performance: writes are not synchronized on both servers, offering some performance gains. Assumes everything will complete successfully on the mirror.
Microsoft Confidential
Database MirroringWitness Server
Principal Mirror
Encrypted channel
Ever
ythi
ng
ok?
Everything
ok?
Principal Down!
I’m OK!
New Principal
Microsoft Confidential
SharePoint and MirroringWhen failover occurs need to notify SharePoint
Need to tell these DBs that a new server is now the principal:
Configuration Database, Admin Content DatabaseContent DatabaseShared Service Provider Database (MOSS)Search Database (MOSS)
Content DBs attach reattach
Config DB and admin content DBstsadm.exe -o renameserver -oldservername <oldServerName> -newservername <newServerName>
(refer to TechNet whitepaper)
Microsoft Confidential
Log-ShippingBackup/Restore based technology that relies on transaction log files
Need to have a shared folder that contains the log file backups
Configure the frequency of backups and shipping
No automatic failover
Allows you to replicate data to several databases (one to many)
Microsoft Confidential
Log-Shipping Mirror FarmMirror / failover farm
Warm backup for quick content recoveryReplicate primary farm on secondary systemSQL log shipping transfers content DB dataOn disaster, router switches traffic in minutes
Limitations:Must manually replicate configuration changesErrors will be log shipped to mirror farmRequires additional hardwareSearch indexer must run separately on mirror farmSecondary farm must be read-only
“I want the minimal delay when my data center goes down!”“I need another farm to test my solutions before I put
them into production!”
Microsoft Confidential
SQL Failover Clustering
Hot backup: short recovery time
Unattended application availability: automatic failover capability without administrator intervention
“If my SQL server blows up (hardware failure), how do I keep my SharePoint farm running?”
Server Cluster
SharePoint Web Front Ends
Shared Disk Array
Node A Node B
Heartbeat
Log-Shipping vs. ClusteringFailover Clustering Log Shipping Mirror Farm
The secondary node takes over immediately (hot)
A delay occurs before the secondary node takes over (warm); some manual intervention
Failure is automatically detected
Failure detected automatically (if using a witness)
Failover is automatic Failover is automatic
Protects against failed service Protects against failed service
Does not protect against failed storage
Protects against failed storage
All databases protected Only log-shipped databases are protected
Transactionally consistent Transactionally consistent
Transactionally concurrent Not transactionally concurrent
Limited distance (Win 2003) Unlimited distance
Short time to recovery (seconds/minutes)
Longer time to recover
Summary• All but Config• 3rd party solutionFarm• WSS UI or STSADM Full or Diff
Web application
• WSS UI/SQL BackupDatabase
• STSADM site collection backupSite Collection• STSADM export/import• STP (no security, datetime stamps)Site (Web)• Export/Import API code• STP (no security, datetime stamps, limited on size)List
• Export/Import API codeList Item
Content Recovery Disaster Recovery
Your Options
• Recycle Bin• Versioning• DB Snap Shots• Site Delete
Capture (Web Delete Event)
• 3rd party tools
SharePoint backup/restoreSQL-only3rd party tools
High Availability
Database MirroringLog-ShippingSQL Clustering3rd party tools
Which combination of tools is right for your customer?
Related Content • How to use SQL Server to take a snapshot of a Windows
SharePoint Services 3.0 content database– http://support.microsoft.com/?id=929649
• Overview of Database Mirroring – http://msdn2.microsoft.com/en-us/library/ms189852.aspx
• Understanding Log Shipping– http://msdn2.microsoft.com/en-us/library/ms187103.aspx
• Log Shipping and Mirroring– http://msdn2.microsoft.com/en-us/library/ms187016.aspx
Related Content• Joel Oleson’s SharePoint Land Blog describes
backup/ restore considerations based on deployment: http://blogs.msdn.com/joelo/archive/2006/10/06/SharePoint-Tech-Content-Database-sizing-and-capacity-planning-_2800_backup_2F00_restore-implications_2900_.aspx
• Using Backup and Restore (Office SharePoint Server 2007): http://technet2.microsoft.com/Office/en-us/library/5a39029f-0939-452b-acd2-44ff87e7ff711033.mspx?mfr=true
• Replication and High Availabilityhttp://
blogs.msdn.com/joelo/archive/2007/04/02/replication-and-high-availability.aspx
• For ITPros: (RTM Exam)–70-631 - Windows SharePoint Services 3.0 -
Configuring–70-630 - Office SharePoint Server 2007 -
Configuring
• For Developers: (Beta Exam)–70-541 - Microsoft Windows SharePoint Services
3.0 - Application Development–70-542 - Microsoft Office SharePoint Server 2007 -
Application Development
DON'T DELAY – TAKE 'EM TODAY!!!Be one of the first to pass the NEW MCTS Exams!!!