Backup & Restore in
SharePoint 2013
ü
Overview
The
SharePoint 2013 backup architecture and recovery processes include farm backup
and recovery, granular backup and recovery, and recovery from an unattached
content database. You can complete backup and recovery operations by using the
SharePoint Central Administration website or Windows PowerShell cmdlets. Note
that some built-in backup and recovery tools may not meet all the requirements
of your organization.
Backup - A backup
is a copy of data that is used to restore and recover after a system failure.
While backups allow you to restore data after a failure and they are also
useful to keep for routine purposes.
Restore – To put or
bring back the backup data in to existence or use after the system failure.
ü
SharePoint Backup & Recovery Scenarios
Backing up
and recovering data supports many business scenarios, including the following:
-
Recovering
unintentionally deleted content that is not protected by the recycle bin or
versioning.
-
Moving data
between installations as part of a hardware or software upgrade.
-
Recovering
from an unexpected failure.
ü
Backup architecture in SharePoint 2013
SharePoint
2013 provides two backup systems - Farm & Granular
Farm backup architecture in
SharePoint 2013
The farm backup architecture in SharePoint
2013 starts a SQL Server backup of content and service application databases,
writes configuration content to files, and also backs up the Search index files
and synchronizes them with the Search database backups.
The
architecture supports both full and differential backups. Full backups create a new backup of the
complete system. Differential backups
create a backup of all changes that are stored in databases since the last full
backup.
Granular backup & Export
architecture in SharePoint 2013
The granular
backup and export architecture uses Transact-SQL queries and export calls.
Granular backup and export is a more read-intensive and processing-intensive
operation than farm backup.
From the
granular backup system, you can back up a site collection or export a site or
list.
ü
Recovery process in SharePoint 2013
SharePoint 2013 supports the
following primary, built-in recovery options:
-
Restore from a farm backup that
was created by using built-in tools.
-
Restore from the backup of a
component taken by using the farm backup system.
-
Restore from a site collection
backup.
-
Connect to a content database by
using the unattached content database feature, back up or export data from it,
and then restore or import the data.
ü
Backup for SharePoint 2013
·
Backup farms
Description
Describes the procedures that you can use to back up the
complete farm.
Backup
using PowerShell
Backup-SPFarm -Directory <BackupFolder>
-BackupMethod {Full | Differential} [-Verbose]
Backup
using Central Administration(Full/Differential backup)
·
Backup farm configurations
Description
Describes
the procedures that you can use to back up farm configuration settings.
Backup
using PowerShell
Backup-SPConfigurationDatabase -Directory
<BackupFolder> -DatabaseServer <DatabaseServerName> -DatabaseName
<DatabaseName> -DatabaseCredentials
<WindowsPowerShellCredentialObject> [-Verbose]
Backup
using Central Administration(Full backup)
·
Backup web applications
Description
Describes
the procedures that you can use to back up a web application that is associated
with the farm that include configuration and content databases.
Backup
using PowerShell
Backup-SPFarm -Directory <BackupFolder>
-BackupMethod {Full | Differential} -Item <WebApplicationName> [-Verbose]
Backup
using Central Administration (Full /Differential backup)
·
Backup service applications
Description
Describes
the procedures that you can use to back up a service application that is
associated with the farm that include configuration and content databases.
Backup
using PowerShell
Backup-SPFarm -Directory <BackupFolder>
-BackupMethod {Full | Differential} -Item <ServiceApplicationName>
[-Verbose]
Backup
using Central Administration (Full/Differential backup) – All Service
applications
·
Backup User Profile service applications
Description
Describes
the procedures that you can use to back up a User Profile Service application
that is associated with the farm that include configuration and content
databases.
Backup
using PowerShell
Backup-SPFarm -Directory <BackupFolder>
-BackupMethod Full -Item Farm\Shared Services\Shared Service
Applications\<ServiceApplicationName> [-Verbose]
Backup
using Central Administration
a) Backup user
profile service application (Full backup)
b) Backup user
profile service application proxy (Full backup)
·
Backup search service applications
Description
Describes
the procedures that you can use to back up the Search service application that
is associated with the farm that include configuration and indexes.
Backup
using PowerShell
Backup-SPFarm -Directory <BackupFolder>
-BackupMethod {Full | Differential} -Item "Farm\Shared Services\Shared
Services Applications\<SearchServiceApplicationName>" [-Verbose]
Backup
using Central Administration (Full/Differential Backup)
·
Backup Secure Store Service application
Description
Describes
the procedures that you can use to back up the Secure Store service application
that is associated with the farm that include configuration and content
databases.
Backup
using PowerShell
Backup-SPFarm -Directory <BackupFolder> -BackupMethod Full -Item
<SecureStoreService > [-Verbose]
Backup
using Central Administration (Full)
·
Backup Content Databases
Description
Describes
the procedures that you can use to back up a content database that is
associated with the farm.
Backup
using PowerShell
Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item
<ContentDatabaseName> [-Verbose]
Backup using Central
Asministration(Full/Differential backup)
·
Backup databases to snapshots
Description
Describes
the procedures that you can use to back up a content database that is
associated with the farm by saving the database to a snapshot.
Using SQL server
tools to back up a database to a snapshot in SharePoint server
a)
Verify that the user account that is performing this procedure is
a member of the SQL Server db_owner fixed database role.
b)
Open SQL Server Management Studio and connect to the database
server.
c)
In Object Explorer, expand Databases.
d)
Select the database that you want to back up, and then click New Query.
e)
Copy the following text, and then paste it to the query pane.
CREATE DATABASE <snapshot name>
ON
(
NAME=<logical name of the database
file>,
FILENAME = 'c:\WSS_Backup1.ss')
AS SNAPSHOT OF <database name>;
·
Backup Customizations
Description
Describes
the procedures that you can use to back up customizations that are associated
with the farm.
a) Backup solution
packages
To back up trusted
solutions by using Windows PowerShell
Backup-SPFarm -backupmethod full -directory
<UNC location> -item "farm\solutions"
To back up trusted
solutions by using Central Administration(Full/Differential)
· Backup Site Collections
Description
Describes
the procedures that you can use to back up site collections that are associated
with the farm.
Backup using PowerShell
Backup-SPSite -Identity
<SiteCollectionGUIDorURL> -Path <BackupFile> [-Force] [-NoSiteLock]
[-UseSqlSnapshot] [-Verbose]
Backup using Central Administration
·
Backup apps for SharePoint
Description
Describes
how to back up apps for SharePoint in SharePoint 2013.
You
can back up some apps for SharePoint environment by using the SharePoint
Central Administration website, Windows PowerShell, or SQL Server tools.
Below
are the databases and site collection that needs to be back up:
-
Content database
-
Configuration database
-
Secure Store Service application database
-
App Management service application database
&
-
Backup a site collection
·
Backup sites, lists, or document libraries
Description
Describes
the procedures that you can use to export a list, site, or document library
that is associated with the farm. You can then import the items into another
farm or move them to another place in this farm.
Backup
using PowerShell
Export-SPWeb -Identity <SiteURL> -Path
<Path and File Name> [-ItemUrl <URL of Site, List, or Library>]
[-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete]
[-Verbose]
Backup
using Central Administration
·
Backup Workflow
Description
Describes
important information that you need to consider before backing up workflows in
SharePoint 2013.
Backup workflow process
a) Declarative workflows, such as those that were
created in SharePoint Designer 2013, are stored in the content database for the
site collection to which they are deployed. Backing up the content database
protects these workflows.
a)
Custom declarative workflow actions have components in the
following three locations:
a.
The Visual Studio 2012 assemblies for the actions are stored in
the global assembly cache (GAC).
b.
The XML definition files (.ACTIONS files) are stored in the
15\TEMPLATE\<LCID>\Workflow
directory.
c.
An XML entry to mark the action as an authorized type is stored in
the Web.config file for the Web applications in which it is used.
If the farm workflows use custom
actions, you should use a file backup system to protect these files and XML
entries. Similar to SharePoint 2013 features such as Web Parts and event
receivers, these files should be reapplied to the farm as needed after
recovery.
b)
Workflows that depend on custom code, such as those that are
created by using Visual Studio 2012, are stored in two locations. The Visual
Studio 2012 assemblies for the workflow are stored in the GAC, and the XML
definition files are stored in the Features directory. This is the same as
other types of SharePoint 2013 features such as Web Parts and event receivers.
If the workflow was installed as part of a solution package, backing up the
farm, Web application, content database, or site collection protects these
workflows.
c)
If you create a custom workflow that interacts with a site
collection other than the one where the workflow is deployed, you must back up
both site collections to protect the workflow. This includes workflows that
write to a history list or other custom list in another site collection.
Performing a farm backup is sufficient to back up all site collections in the
farm and all workflows that are associated with them.
d)
Workflows that are not yet deployed must be backed up and restored
separately. When you are developing a new workflow but have not yet deployed it
to the SharePoint 2013 farm, make sure that you back up the folder where you
store the workflow project files by a file system backup application.
ü
Restore for SharePoint 2013
· Restore farms
Description
Describes
the procedures that you can use to restore the complete farm from a backup.
Restore
using PowerShell
Restore-SPFarm -Directory <BackupFolder>
-RestoreMethod Overwrite [-BackupId <GUID>]<Type the appropriate
cmdlet, including parameters and values, and enclose the values for the
parameters in "placeholder" tags >
· Restore farm Configuration
Description
Describes
the procedures that you can use to restore the farm configuration to the same
farm from a backup.
Restore
using PowerShell
Restore-SPFarm -Directory <RestoreShare>
-RestoreMethod Overwrite -ConfigurationOnly
·
Document farm configuration settings
Description
Describes
how to use Windows PowerShell to document the configuration settings for your
farm. Documenting configuration settings is important both so that you can
create scripted deployments for your environment, and so that you can quickly
re-create a set of configurations if a failure were to occur.
·
Copy configuration settings between farms
Description
Describes
the procedures that you can use to of copy configuration settings from one farm
to another, such as how to back up and recover a farm without the content
databases, how to back up and recover configurations only, and how to create a
deployment script.
Using Powershell
-
Document the current Web application URLs and
content database mappings
Get-SPWebApplication |
%{$_.Name;$_.Url;%{$_.ContentDatabases|%{$_.N
-
Either unmount
all content databases
Get-SPContentDatabase |
Dismount-SPContentDatabase
-
Or unmount a specific content database
Get-SPContentDatabase WSS_Content |
Dismount-SPContentDatabase
-
Back up the farm
Backup-SPFarm -Directory \\servername\share
-BackupMethod Full
-
After the backup is complete, re-mount the
content databases.
Mount-SPContentDatabase -Name
<WSS_Content> -WebApplication <http://servername>
· Restore web applications
Description
Describes
the procedures that you can use to restore a Web application that is associated
with the farm that include configuration and content databases, from a backup.
Restore using
PowerShell
Restore-SPFarm -Directory
<BackupFolderName> -RestoreMethod Overwrite -Item <WebApplicationName> [-BackupId
<GUID>] [-Verbose]
·
Restore service applications
Description
Describes
the procedures that you can use to restore a service application that is
associated with the farm that include configuration and content databases, from
a backup.
Restore using
PowerShell
a) To restore single service
application
Restore-SPFarm -Directory <BackupFolder>
-Item "<ServiceApplicationName>" -RestoreMethod Overwrite
[-BackupId <GUID>] [-Verbose]
b) To restore all service applications
Restore-SPFarm -Directory <BackupFolder>
-Item "Farm\Shared Service Applications" -RestoreMethod Overwrite
[-BackupId <GUID>] [-Verbose]
·
Restore user profile service application
Description
Describes
how to restore the User Profile Service service application instead of
restoring the complete farm.
Restore using
PowerShell
Restore-SPFarm -Directory <BackupFolder>
-Item Shared Services\Shared Services
Applications\<ServiceApplicationName> -RestoreMethod Overwrite [-BackupId
<GUID>] [-Verbose]
· Restore search service application
Description
Describes
the procedures that you can use to restore the Search service application
associated with the farm that include configuration and indexes, from a backup.
Restore using
PowerShell
Restore-SPFarm -Directory
<BackupFolder> -Item "<ServiceApplicationName>"
-RestoreMethod Overwrite [-BackupId <GUID>] [-Verbose]
When you restore a Search service
application, it is automatically paused. To resume the Search service
application when the restore has completed
$ssa =
Get-SPEnterpriseSearchServiceApplication <SearchServiceApplicationName>
$ssa.ForceResume(0x02)
·
Restore secure store service application
Description
Describes the procedures that you can use to
restore the Secure Store service application that is associated with the farm
that include configuration and content databases, from a backup.
Restore using
PowerShell
Restore-SPFarm -Directory <BackupFolder>
-Item <SecureStoreServicename> -RecoveryMethod Overwrite [-BackupId
<GUID>] [-Verbose]
If you have multiple backups use the
BackupId parameter to specify which backup to use. To view all the
backups for the farm
Get-SPBackupHistory -Directory
<BackupFolder> -ShowBackup
After the restore operation has successfully
completed, you must refresh the passphrase
Update-SPSecureStoreApplicationServerKey
-Passphrase <Passphrase>
· Restore content databases
Description
Describes the procedures that you can use to
restore a content database from a backup.
Restore using
PowerShell
Restore-SPFarm -Directory <BackupFolder>
-RestoreMethod Overwrite -Item <ContentDatabase> [-BackupId <GUID>]
[-Verbose]
If you do not use
the BackupId parameter, the most recent backup will be used. To view
all the backups for the farm
Get-SPBackupHistory -Directory <Backup
folder>
· Attach & Restore a read-only content database
Description
Describes the procedures that you can use to
attach a read-only content database to the farm.
Restore using
PowerShell
Mount-SPContentDatabase -Name
<DatabaseName> -WebApplication <WebApplicationID> [-Verbose]
·
Restore content from unattached content database
Description
Describes how you can restore or copy
content, such as sites, site collections, lists, or document libraries, from a
content database without having to attach the content database to the farm.
Restore using PowerShell
Get-SPContentDatabase
-ConnectAsUnattachedDatabase
-DatabaseName <DatabaseName> -DatabaseServer
<DatabaseServer>
·
Restore customizations
Description
Describes the procedures that you can use to
restore customizations that are associated with the farm from backups.
Restore using
PowerShell
Restore-SPFarm -Directory <BackupFolder>
-RestoreMethod Overwrite -BackupId <GUID> -Item <SolutionPath>
·
Restore site collections
Description
Describes the procedures that you can use to
restore a site collection from a backup.
Restore using
PowerShell
Restore-SPSite -Identity
<SiteCollectionURL> -Path <Backup file> [-DatabaseServer
<DatabaseServerName>] [-DatabaseName <ContentDatabaseName>]
[-HostHeader <Host header>] [-Force] [-GradualDelete] [-Verbose]
·
Restore apps for SharePoint
Description
Learn how to restore apps for SharePoint in
SharePoint 2013.
Restore below
components
-
Restore content databases
-
Restore the configuration database
-
Restore the Secure Store Service
application database
-
Restore the App Management service
application database
-
Restore a site collection
-
To restore a site collection by using
Windows PowerShell
-
Restore apps for SharePoint to a new
farm
·
Import a list or document library
Description
Describes
the procedures that you can use to restore a site, list, or document library
from a backup.
Restore
using PowerShell
Import-SPWeb -Identity <SiteURL> -Path
<ImportFileName> [-Force] [-NoFileCompression] [-Verbose]





























No comments:
Post a Comment