Understanding SharePoint Disaster Recovery

Document Sample
Understanding SharePoint Disaster Recovery Powered By Docstoc
					  TOOLS FOR
  SQL SERVER       Understanding
                   Disaster Recovery

Michael Foertsch
Houston TechFest
October 9, 2010
Who am I?

• Lead Architect, Idera SharePoint Product Group
• .NET developer, especially Windows service
• Architect and developer of Idera SharePoint
  Backup services
• Architect and developer of Idera SQLsafe
• Track driving instructor
Who wants to talk backup?

Backup is boring.
Restore is quite exciting!
(And not in a good way, usually…)

• Disaster recovery concepts
• What do I need to backup in a
  SharePoint environment?
• Understanding backup coverage
• How do I do a backup?
• How do I do a restore?
• Other disaster recovery tips and tricks
Disaster recovery concepts

•   What is your disaster recovery timeline?
•   Recovery point objective (RPO)
•   Recovery time objective (RTO)
•   You need to determine what is appropriate
    for your organization
    – Budget
    – Business criticality
Disaster Recovery Timeline
Recovery Point Objective (RPO)
Recovery Time Objective (RTO)
What do I need to backup?
•   Content databases
•   Configuration database
•   Service application databases
•   Search databases
•   Search indexes (files)
•   SharePoint root directory (“14 hive”)
•   SharePoint-related registry entries
•   IIS configuration files
•   IIS webroots (web.config, Web parts, etc.)
•   SSL certificates
•   GAC
•   Custom code
•   External databases connected by BCS
•   Authentication providers (CBA, etc.)
What do I need to backup?

• No built-in SharePoint backup tool covers
• ~99% of what you can’t manually recreate
  is in content databases
• The other ~1% is “everywhere else”
• Decide what you are willing to rebuild
• Document all configuration changes
Understanding backup coverage

• Catastrophic
  – Physical view of your
  – Databases, config,
    files, etc.
• Granular
  – Logical view of your
  – Web applications and
    “down” (site
    collections, sites, etc.)
Catastrophic backup
• Central administration backup wizard
  –   Web user interface wizard
  –   Cannot schedule backups using this interface
  –   Uses timer jobs; asynchronous
  –   Full and differential backups only
Catastrophic backup

• PowerShell command: Backup-SPFarm
  Entire farm:
  Backup-SPFarm -Directory <BackupFolder> -BackupMethod
  [Full | Differential}

  Web application (content database and config):
  Backup-SPFarm -Directory <BackupFolder> -BackupMethod
  {Full | Differential} -Item <WebApplicationName>

  Service application (database and config):
  Backup-SPFarm -Directory <BackupFolder> -BackupMethod
  {Full | Differential} -Item <ServiceApplicationName>
Catastrophic restore
• Central administration restore wizard
Catastrophic restore

• PowerShell command: Restore-SPFarm
  Entire farm:
  Restore-SPFarm -Directory <BackupFolder> -RestoreMethod
  Overwrite [-BackupId <GUID>]

  List backup history:
  Get-SPBackupHistory -Directory <BackupFolder>

  Restart service application:
  Start-SPServiceInstance –Identity <ServiceApplicationID>
Catastrophic disaster recovery

• Remember there are lots of options; make
  sure to read the MSDN documentation
• When restoring, make sure you
  understand what you’re getting ready to do
• Follow your disaster recovery plan (you
  have one, don’t you?)
• Always be mindful of your disaster
  recovery timeline, RPO, RTO
Granular backup
                          Site collection backup

    Site or list export
Granular backup

• Backup site collection using PowerShell:
  Backup-SPSite -Identity <Site collection name> -Path <backup
  file> [-Force] [-NoSiteLock] [-UseSqlSnapshot]

• Export web site using PowerShell:
  Export-SPWeb -Identity <Site URL> -Path <Path and file
  name> [-ItemUrl <URL of site, list, or library>]
  [-IncludeUserSecurity] [-IncludeVersions]
  [-NoFileCompression] [-GradualDelete]
Granular restore

• Restore site collection using PowerShell:
  Restore-SPSite -Identity <Site collection URL> -Path <Backup
  file> [-DatabaseServer <Database server name>] [-
  DatabaseName <Content database name>] [-HostHeader <Host
  header>] [-Force] [-GradualDelete]

• Import web site using PowerShell:
  Import-SPWeb -Identity <Site URL> -Path <Export file name>
  [-Force] [-NoFileCompression]
Unattached content database recovery

• New in SharePoint 2010
• Allows restore of objects (sites, lists, list
  items, etc.) from a content database not
  visible to SharePoint
• Still have to export to file and import into
  live environment; no “direct import”
• Can’t recover individual documents/list
Other backup methods to consider

• SQL database backup
  – Transaction log backup capability
  – Compressed & encrypted backups are
  – More performance tuning options
• Complete server backup (“bare metal”)
  – Pick your favorite backup software
  – Lots more to backup outside of databases
• Third-party backup tools
Other disaster recovery tips
• Document, document, document!
   – Most farm configuration can be rebuilt manually if you
     have good notes
• Test, test, test!
   – Use virtual machines to “practice” with the tools
   – No substitute for hands-on experience
• Remember that backup and restore operations are
  resource intensive
• Configure two-stage recycle bin
• Consider using versions
• Use anti-virus software integration
  Other disaster recovery tips

• Consider SQL high availability
• Consider Windows clusters
• All physical disaster recovery
  plans apply to SharePoint
  servers as well
   – Redundant physical
   – Offsite backup storage
• Remember, backups don’t
  matter… restores matter!
Resources and references

• SharePoint 2010 Disaster Recovery Guide, John
  Ferringer & Sean McDonough
• MSDN content for SharePoint
  – Nicely updated for SharePoint 2010, especially all
    PowerShell commands
• Blogs and presentations by MS SharePoint
  MVPs and others
  – http://sharepointinterface.com/2009/07/08/rpo-and-rto-prerequisites-for-
    informed-sharepoint-disaster-recovery-planning/ (disaster recovery
    timeline graphics)
Questions? Comments?

• Michael Foertsch
  – mfoertsch@idera.com
  – http://www.idera.com/
  – Twitter: @weneversleep

Shared By: