sharepoint server 2013 disaster recovery in windows azure

22
SharePoint Server 2013 Disaster Recovery in Windows Azure This topic has not yet been rated - Rate this topic Applies to: Windows Server 2012, Windows Azure, SQL Server 2012, SharePoint Server 2013 Enterprise, Office Professional 2013, data and storage, AD DS Topic Last Modified: 2014-03-03 Summary: Using Windows Azure Infrastructure Services, you can create a disaster-recovery environment for your on-premises SharePoint farm. This article describes how to design and implement this solution. Use this article with the following solution model: SharePoint Disaster Recovery in Windows Azure Figure 1: SharePoint Disaster Recovery Solution Hosted in Windows Azure Visio version [1] PDF version [2] In this article: Use Windows Azure Infrastructure Services for disaster recovery [3] Many organizations do not have a disaster-recovery environment for SharePoint. This is because it can be expensive to build and maintain a recovery environment on-premises. Windows Azure Infrastructure Services provides compelling options for disaster recovery environments that are more flexible and less expensive than the on-premises alternatives. Advantages include: Hosted secondary datacenter Use Windows Azure Infrastructure Services instead of investing in a secondary datacenter in a different region. Lower-cost disaster-recovery environments Maintain and pay for fewer resources than an on-premises disaster-recovery environment. The number of resources depend on which disaster-recovery environment you choose: cold standby, warm standby, or hot standby. Windows Azure Infrastructure Services is elastic Easily scale-out your recovery SharePoint farm in the event of a disaster to meet load requirements. Scale in when you no longer need the resources. Entry-level options for companies getting started with disaster recovery are possible, as well as advanced options for enterprises with high resiliency requirements. Definitions for cold, warm, and hot standby environments are a little different when the environment is hosted in a cloud platform. The following table shows how we think about these environments when building a SharePoint recovery farm in Windows Azure. Table: Recovery environments Type of recovery environment Description

Upload: vcissgroup

Post on 01-Nov-2014

373 views

Category:

Technology


3 download

DESCRIPTION

Summary: Using Windows Azure Infrastructure Services, you can create a disaster-recovery environment for your on-premises SharePoint farm. This article describes how to design and implement this solution. Use this article with the following solution model: SharePoint Disaster Recovery in Windows Azure

TRANSCRIPT

Page 1: SharePoint Server 2013 Disaster Recovery in Windows Azure

SharePoint Server 2013 Disaster Recovery in Windows Azure

This topic has not yet been rated - Rate this topic

Applies to: Windows Server 2012, Windows Azure, SQL Server 2012, SharePoint Server 2013 Enterprise, Office Professional 2013, data and storage, AD

DS

Topic Last Modified: 2014-03-03

Summary: Using Windows Azure Infrastructure Services, you can create a disaster-recovery environment for your on-premises SharePoint farm.

This article describes how to design and implement this solution.

Use this article with the following solution model: SharePoint Disaster Recovery in Windows Azure

Figure 1: SharePoint Disaster Recovery Solution Hosted in Windows Azure

Visio version[1]

PDF version[2]

In this article:

Use Windows Azure Infrastructure Services for disaster recovery[3]

Many organizations do not have a disaster-recovery environment for SharePoint. This is because it can be expensive to build and maintain a

recovery environment on-premises. Windows Azure Infrastructure Services provides compelling options for disaster recovery environments that

are more flexible and less expensive than the on-premises alternatives.

Advantages include:

Hosted secondary datacenter Use Windows Azure Infrastructure Services instead of investing in a secondary datacenter in a different

region.

Lower-cost disaster-recovery environments Maintain and pay for fewer resources than an on-premises disaster-recovery environment.

The number of resources depend on which disaster-recovery environment you choose: cold standby, warm standby, or hot standby.

Windows Azure Infrastructure Services is elastic Easily scale-out your recovery SharePoint farm in the event of a disaster to meet load

requirements. Scale in when you no longer need the resources.

Entry-level options for companies getting started with disaster recovery are possible, as well as advanced options for enterprises with high

resiliency requirements. Definitions for cold, warm, and hot standby environments are a little different when the environment is hosted in a

cloud platform. The following table shows how we think about these environments when building a SharePoint recovery farm in Windows Azure.

Table: Recovery environments

Type of recovery

environment

Description

Page 2: SharePoint Server 2013 Disaster Recovery in Windows Azure

A fully-sized farm is provisioned, updated, and running on standby.

The farm is built and VMs are running and updated.

Recovery includes attaching content databases, provisioning service applications, and crawling content.

The farm can be a smaller version of the production farm and then scaled out to serve the full user base.

The farm is fully built, but the VMs are stopped.

Maintaining the environment includes starting the VMs from time-to-time, patching, updating, and verifying the

environment.

Start the full environment in the event of a disaster.

It is important to evaluate your organization’s Recovery Time Objectives (RTO) and Recovery Point Objectives (RPO). These requirements will

determine which environment is the most appropriate investment for your organization.

The guidance in this article describes how to implement a warm standby environment. This guidance can be adapted for a cold standby

environment, though additional procedures will be needed to support this environment. This guidance does not address hot standby

environments.

For more information about disaster recovery solutions see High availability and disaster recovery concepts in SharePoint 2013[4] and Choose a

disaster recovery strategy for SharePoint 2013[5].

Solution description[6]

The warm standby disaster recovery solution requires the following environment.

On-premises SharePoint production farm

Recovery SharePoint farm in Windows Azure

Site-to-site VPN connection between the two environments

The following figure illustrates these three elements.

Figure 2: Elements of a warm standby solution in Windows Azure

SQL Server Log shipping together with Distributed File System Replication (DFSR) are used to copy database backups and transaction logs to the

recovery farm in Windows Azure.

DFSR is used to transfer logs from the production environment to the recovery environment. In a WAN scenario DFSR is more efficient than

shipping the logs directly to the secondary server in Windows Azure.

Logs are replayed to the SQL servers in the recovery environment in Windows Azure.

Log-shipped databases are not attached to the farm until a recovery exercise is performed.

Failover includes the following steps:

Stop log shipping.

Stop accepting traffic to the primary farm.

Replay the final transaction logs.

Attach the content databases to the farm.

Page 3: SharePoint Server 2013 Disaster Recovery in Windows Azure

Restore service applications from the replicated services databases.

Update DNS records to point to the recovery farm.

Start a full crawl.

Recovery objectives provided by this solution are summarized in the following table.

Table: Solution recovery objectives

Item Description

Sites

and

content

Sites and content are available in the recovery environment.

A new

instance

of

search

In this warm standby solution, search is not restored from search databases. Search components in the recovery farm are configured as

similarly as possible to the production farm. After the sites and content are restored, a full crawl is started to rebuild the search index.

You do not need to wait for the crawl to complete to make the sites and content available.

Services Services that store data in databases are restored from the log-shipped databases. Services that do not store data in databases are

simply started.

Not all services with databases need to be restored. The following services do not need to be restored from databases and can simply

be started after failover:

Usage and Health Data Collection

State service

Word automation

Any service without a database

Additional items that can be addressed by Microsoft Consulting Services or a partner are summarized in the following table.

Table: Other disaster recovery resources

Item Description

Synchronizing

custom farm

solutions

Ideally the recovery farm is configured identically as possible to the production farm. You can work with a consultant or

partner to evaluate whether custom farm solutions are replicated and the process for keeping the two environments in sync.

Connections to

data sources on-

premises

It might not be practical to replicate connections to backend data systems, such as BDC connections and search content

sources.

Search restore

scenarios

Because enterprise search deployments tend to be fairly unique and very complex, restoring search from databases requires a

greater investment. You can work with a consultant or partner to identify and implement search restore scenarios that your

organization might require.

This solution guidance assumes that the on-premises farm is already designed and deployed.

Detailed architecture[7]

Ideally the recovery farm in Windows Azure is configured as identically as possible to the production farm on-premises:

Same representation of server roles

Same configuration of customizations

Same configuration of search components

The environment in Windows Azure can be a smaller version of the production farm. If you plan to scale out the recovery farm out after failover,

it is important that each type of server role is represented initially.

Some configurations might not be practical to replicate in the failover environment. Be sure to test the failover procedures and environment to

ensure that the failover farm provides the service level that is expected.

Page 4: SharePoint Server 2013 Disaster Recovery in Windows Azure

This solution doesn't prescribe a specific topology for a SharePoint farm. The focus of this solution is using Windows Azure for the failover farm

and implementing log shipping and DFSR between the two environments.

Warm standby environments[8]

In a warm standby environment, all VMs in the Windows Azure environment are running. The environment is ready for a failover exercise or

event.

The following figure illustrates a disaster recovery solution from an on-premises SharePoint farm to a Windows Azure-based SharePoint farm

that is configured as a warm standby environment.

Figure 3: Topology and key elements of production farm and warm standby recovery farm

In this illustration:

Two environments are illustrated side-by-side — the on-premises SharePoint farm and the warm standby farm in Windows Azure.

A file share is included in each environment.

Each farm includes four tiers. To achieve high availability, each tier includes two servers or VMs that are configured identically for a specific

role, such as front-end services, distributed cache, backend services, and databases. It isn't important in this illustration to call out specific

components. The two farms are configured identically.

The fourth tier is the database tier. Log shipping is used to copy logs from the secondary database server in the on-premises environment to

the file share in the same environment.

DFSR is used to copy files from the file share in the on-premises environment to the file share in the Windows Azure environment.

Log shipping is used to replay the logs from the file share in the Windows Azure environment to the primary replica in the SQL Server

AlwaysOn availability group in the recovery environment.

Cold standby environments[9]

In a cold standby environment, most of the SharePoint farm VMs can be shut down. (We recommend occasionally starting the virtual machines,

such as every two weeks or once a month, so each can sync with the domain.) The following VMs in the Windows Azure recovery environment

must remain running to ensure continuous operations of log shipping and DFSR:

The file share

The primary database server

At least one VM running Windows Server Active Directory and DNS

The following figure shows a Windows Azure failover environment in which the file share VM and the primary SharePoint database VM are

running. All other SharePoint VMs are stopped. The VM running Windows Server Active Directory and DNS is not shown.

Figure 4: Cold standby recovery farm with running VMs

Page 5: SharePoint Server 2013 Disaster Recovery in Windows Azure

After failover to a cold standby environment, all VMs are started and the method used to achieve high availability of the database servers must be

configured, such as SQL Server AlwaysOn availability groups.

If multiple storage groups are implemented (databases are spread across more than one set of highly available SQL Servers) the primary database

for each storage group must be running to accept the logs associated with its storage group.

Designing the Windows Azure environment[10]

Before deploying VMs in Windows Azure it is important to design the Windows Azure environment, including the virtual network and site-to-

site VPN connection that is a requirement for this solution. For this design task, see Windows Azure Architectures for SharePoint 2013[11].

Microsoft proof of concept environment[12]

The design goal for our test environment was to deploy and recover a SharePoint farm that we’d expect to see in a customer environment. We

made several assumptions, but knew that the farm needed to provide all of the out of the box functionality, without any customizations. The

topology would be designed for high availability using best practice guidance from the field and product group.

The following table describes the Hyper-V virtual machines we created and configured for the on-premises test environment.

Table: Virtual machines for on-premises test

Server name Role Configuration

Domain controller with Active Directory 2 processors

512 – 4 GB

RAM

1 x 127 GB

Hard Disk

Server configured with the Routing and Remote Access Service role 2 processors

2 - 8 GB

RAM

1 x 127 GB

Hard Disk

File server with shares for backups and end point for DFSR 4 processors

Page 6: SharePoint Server 2013 Disaster Recovery in Windows Azure

2 - 12 GB

RAM

1 x 127 GB

1 x 1 TB

(SAN)

1 x 750 GB

SP-WFE1, SP-

WFE2

Front end Web servers 4 processors

16 GB RAM

SP-APP1, SP-

APP2, SP-APP3

Application servers 4 processors

2 – 16 GB

RAM

SP-SQL-HA1,

SP-SQL-HA2

Database servers, configured with SQL Server 2012 AlwaysOn availability groups to provide high availability.

This configuration uses SP-SQL-HA1 and SP-SQL-HA2 as the primary and secondary replicas

4 processors

2 – 16 GB

RAM

The following table describes drive configurations for the Hyper-V virtual machines that we created and configured for the front end web and

application, servers for the on-premises test environment.

Table: Virtual machine drive requirements for Front end Web and Application servers for on-premises test

Drive LetterSizeDirectory Name Path

System drive <DriveLetter>:\Program Files\Microsoft SQL Server\

Log drive (40 GB) <DriveLetter>:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA

Page (36 GB <DriveLetter>:\Program Files\Microsoft SQL Server\MSSQL\DATA

The following table describes drive configurations for the Hyper-V virtual machines that we created and configured for the database servers for

the on-premises test environment. On the Database Engine Configuration page access the Data Directories tab to set and confirm the settings

shown in the following table.

Table: Virtual machine drive requirements for Database server for on-premises test

Drive LetterSizeDirectory Name Path

Data root directory <DriveLetter>:\Program Files\Microsoft SQL Server\

User database directory <DriveLetter>:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA

User database log directory <DriveLetter>:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA

Temp DB directory <DriveLetter>:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA

Temp DB log directory <DriveLetter>:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA

Setting up the test environment[13]

During the different deployment phases the test team typically worked on the on-premises part of architecture first, and then on the

corresponding parts of the Windows Azure environment. This reflects the general real world cases, where in-house production farms are already

running. What’s even more important is the fact that you should know the current production workload, capacity, and typical performance. In

addition to building a disaster recovery that can meet business requirements, you need to size the recovery farm servers to deliver a minimum

level of service. In a cold or warm standby environment a recovery farm is typically smaller than a production farm. After the recovery farm is

stable and in production, the farm can be scaled up and out to meet workload requirements.

We deployed our test environment in the following three phases:

Set up the hybrid infrastructure

Page 7: SharePoint Server 2013 Disaster Recovery in Windows Azure

Provision the servers

Deploy the SharePoint farms

Set up the hybrid infrastructure[14]

This phase involves setting up a domain environment for the on-premises farm and for the recovery farm in Windows Azure. In addition to the

normal tasks associated with configuring Active Directory, the test team implemented a routing solution and a VPN connection between the two

environments.

Provision the servers[15]

In addition to the farm servers, it was necessary to provision servers for the domain controllers, and a server configured to handle routing and

remote access service (RRAS) as well as the Site-to-Site VPN. Two file servers were provisioned for the DFSR service and several client computers

were provisioned for testers.

Deploy the SharePoint farm[16]

The SharePoint farm was deployed in two stages in order to simplify stabilizing the environments and troubleshooting if it was required. During

the first stage each farm was deployed on the minimum number of servers for each tier of the topology and to support the functionality that was

required.

We created the farm and joined additional servers in the following order:

Note:

We created the database server with SQL Server installed before creating the SharePoint 2013 servers.

1. Provision SP-SQL-HA1 and SP-SQL-HA2.

2. Configure AlwaysOn and create the 3 availability groups for the farm.

Note:

Because this was a new deployment we could create the availability groups before deploying SharePoint. We created three groups based on

MCS best practice guidance. The SharePoint databases are distributed on the following groups:

Provision SP-APP1 to host Central Administration.

Provision SP-WFE1 and SP-WFE2 to host the distributed cache. Use the skipRegisterAsDistributedCachehost parameter when running

psconfig.exe at the command line. For more information, see Plan for feeds and the Distributed Cache service in SharePoint Server

2013[17].

Note:

It was recognized that if resources or schedule became an issue, the initial environment would be suitable for finishing this proof of concept

disaster recovery project.

After we configured the distributed cache, added test users, and added test content, we started stage two of the deployment. This required that

we scale out the tiers and configure the farm servers to support the high availability topology described in the farm architecture.

Operations[18]

After the farm environments were stable and functional testing was completed, the test team started the operations tasks required to configure

the on-premises recovery environment.

Configure full and differential backups

Configure DFSR on the file servers that would be used to transfer transaction logs between the on-premises environment and the

Windows Azure environment

Configure log shipping on the primary database server

Stabilize, validate and troubleshoot log shipping as required. This included identifying and documenting any behaviors that might cause

issues, such as network latency which would cause log shipping or DFSR file synchronization failures.

For detailed information about preparing the end to end recovery environment, see Phase 5: Setup log shipping to the recovery farm.

Page 8: SharePoint Server 2013 Disaster Recovery in Windows Azure

Disaster recovery roadmap[19]

The roadmap described in the following table assumes that you already have a SharePoint Server 2013 farm deployed in production.

Table: Roadmap for disaster recovery

Phase Description

Phase 1 Review and inventory the on-premises production to farm to ensure that:

The SQL Server AlwaysOn and Log Shipping requirements and configurations in in this article can be met.

Production farm customizations and publishing solutions are fully supported in Windows Azure.

Phase 2 Design and implement a hybrid network environment.

Phase 3 Deploy the SharePoint recovery farm in Windows Azure.

Phase 4 Setup DFSR between the farms.

Phase 5 Setup log shipping to the recovery farm.

Phase 6 Validate failover and recovery solution. This includes the following procedures and technologies:

Stop log shipping

Recover content

Crawl content

Recover services

Manage DNS records

Phase 1: Review and inventory the on-premises product farm[20]

A successful disaster recovery environment must accurately reflect the production farm that you want to recover. The size of the recovery farm is

not the most important thing in the recovery farm’s design, deployment, and testing. Farm scale varies from organization to organization based

on their business requirements. It may be possible to use a scaled down farm for a short outage, or until performance and capacity demands

require you to scale the farm.

The most important thing is the ability to provide a SharePoint farm that meets your SLA requirements and provides the functionality that you

need to support your business. The only way to achieve your recovery goals is to have a detailed inventory of your farm configuration,

applications, and users.

Note:

This should already be part of your disaster recovery plan.

Phase 2: Implement a hybrid network environment[21]

The key components and architecture that’s needed for this hybrid network infrastructure have already been described. In this phase of the

project you have to deploy and configure these components. Based on our test configuration, the following steps are required:

1. Create the domain controller, and create the AD subnets and sites.

2. Deploy a gateway server or install a router that can connect to the Windows Azure VPN gateway.

3. Configure the gateway server (RRAS in our model) to connect the VPN gateway.

4. Deploy a domain controller in Windows Azure and configure it as a subscription server.

For detailed configuration guidance for setting up a domain controller in Windows Azure, see Install a Replica Active Directory Domain

Controller in Windows Azure Virtual Networks[22].

Phase 3: Deploy the SharePoint recovery farm in Windows Azure[23]

The SharePoint recovery farm in Windows Azure, while scaled down, should be configured as closely as possible to the production farm. When

you deploy SharePoint and configure the farm there are some things you don’t have to configure. A good example is site collections, which are

registered in the farm sitemap automatically when you attach the content database created from the backups.

Before we created any virtual machines in Windows Azure we applied the design principles we’ve described and Windows Azure best practice

Page 9: SharePoint Server 2013 Disaster Recovery in Windows Azure

guidance. There are several best practice articles available; Guidance[24] is a good starting point.

We created the cloud services we wanted to use and decided to hold off on creating availability sets until we created the virtual machines.

The following table describes the virtual machines, cloud services, and availability sets we setup for our recovery farm.

Table: Recovery farm infrastructure

Server name Configuration Cloud service Availability

set

spDRAD Domain controller with Active Directory 2 processors

512 – 4 GB RAM

1 x 127 GB Hard

Disk

spDRAD

AZ-SP-FS File server with shares for backups and end point for DFSR A5

configuration:

2 processors

14 GB RAM

1 x 127 GB

1 x 135

1 x 127 GB

1 x 150 GB

sp-

databaseservers

DATA_SET

AZ-WFE1, AZ -WFE2 Front end Web servers A5

configuration:

2 processors

14 GB RAM

1 x 127 GB Hard

Disk

sp-webservers WFE_SET

AZ -APP1, AZ -APP2, AZ

-APP3

Application servers A5

configuration:

2 processors

14 GB RAM

1 x 127 GB Hard

Disk

sp-

applicationservers

APP_SET

AZ -SQL-HA1, AZ -SQL-

HA2

Database servers, primary and secondary replicas for AlwaysOn

availability groups

A5

configuration:

2 processors

14 GB RAM

sp-

databaseservers

DATA_SET

When we deployed the recovery farm in Windows Azure we used the phase-based strategy that we used for the on-premises farm.

The following steps were repeated in the recovery environment:

Provision AZ-SQL-HA1 and AZ-SQL-HA2.

Configure AlwaysOn and create the 3 availability groups for the farm.

Note:

Because this was a new deployment we could create the availability groups before deploying SharePoint. We created three groups based on

Page 10: SharePoint Server 2013 Disaster Recovery in Windows Azure

MCS best practice guidance. The SharePoint databases are distributed across these groups as follows:

Provision AZ-APP1 to host Central Administration.

Provision AZ-WFE1 and AZ-WFE2 to host the distributed cache, which is installed by using the skipRegisterAsDistributedCachehost

parameter when running psconfig.exe at the command line. For more information, see Plan for feeds and the Distributed Cache service

in SharePoint Server 2013[25].

After configuring the distributed cache, adding test users, and adding test content, we started stage two of the deployment. This required scaling

out the tiers and configuring the farm servers to support the high availability topology described in the farm architecture.

Phase 4: Setup DFSR between the farms[26]

In order to setup file replication using DFSR we used DNS Management snap-in. However, before the DFSR setup, we had to log on to the on-

premises fileserver (FS1) and the Windows Azure file server (az-sp-fs) and enable the service in Windows.

From the Server Manager Dashboard we complete the following steps:

Configure this local server

Start the Add Roles and Features Wizard

Open the File and Storage Services node

Select DFS Namespaces and DFS replication

Click Next to finish the wizard steps

Figure 14: DFS Replication Health Report

The preceding screen capture shows the detailed reporting that DFS Management provides. These reports include configuration results and

replication health.

The following table provides links to DFSR reference articles and blog posts.

Table: Reference articles for DFSR

Page 11: SharePoint Server 2013 Disaster Recovery in Windows Azure

Replication[27] DFS Management TechNet topic with links for Replication

DFS Replication: Survival Guide[28] Wiki with links to DFS information

DFS Replication: Frequently Asked Questions[29] DFS Replication TechNet topic

Jose Barreto’s Blog[30] Principal Program Manager on File Server team at Microsoft

The Storage Team at Microsoft – File Cabinet Blog[31] About files services and storage features in Windows Server

Phase 5: Setup log shipping to the recovery farm[32]

Log shipping is the critical component for setting up disaster recovery in this hybrid environment. Log Shipping enables you to automatically

send transaction log files for databases from a primary database server instance to a secondary database server instance. In our on-premises test

environment, which uses AlwaysOn availability groups with two replicas for high availability, we configured log shipping on both replicas. This

is needed because either replica must be able to ship transaction logs. Only the replica that is active and owns the database can ship logs.

However, if there was a failover event and the secondary replica became active, it would have to ship transaction logs instead of the failed replica.

After the transaction logs are received in the Windows Azure environment they are restored, one at a time to each SharePoint database on the

secondary database server.

Note:

Some organizations use a third database server as a monitor to record the history and status of backup and restore operations. This optional

monitor server creates alerts when backup operations fail.

For detailed information about log shipping refer to the articles in the following table.

Table: Reference articles for log shipping

URL Description

About Log Shipping (SQL Server)[33] Describes log shipping transaction log backups and the options that are available.

Configure Log Shipping (SQL Server)

[34]

Describes how to configure log shipping in SQL Server 2012 by using SQL Server Management Studio or

Transact-SQL.

View the Log Shipping Report (SQL

Server Management Studio)[35]

Explains how to view the Transaction Log Shipping Status report in SQL Server Management Studio. You

can run a status report at a monitor server, primary server, or secondary server.

Before you begin[36]

Make sure that you can meet the following log shipping prerequisites.

The SQL Server logins you use are domain accounts that have the permission levels needed for log shipping. The log-shipping stored

procedures require membership in the sysadmin fixed server role.

The primary database must use the full or bulk-logged recovery model.

Caution:

If you switch the database to simple recovery log shipping will quit working.

Before you configure log shipping, you must create a share to make the transaction log backups available to the secondary server. This is a

share of the directory where the transaction log backups will be generated.

In addition to your recovery point objectives (RPO) you want to ensure that the recovered farm data is as complete and uncorrupt as possible. To

reach these goals you have to plan and schedule every aspect of log shipping very carefully.

Performance considerations[37]

Log shipping consists of three jobs. Each job performs one of the following operations:

1. Back up the transaction log at the primary server instance.

2. Copy the transaction log file to the secondary server instance.

3. Restore the log backup on the secondary server instance.

Page 12: SharePoint Server 2013 Disaster Recovery in Windows Azure

Each of the preceding jobs operates on a schedule and runs for an interval, which can have a significant impact on database server, and by

default, SharePoint farm performance.

In order to correctly set the backup, copy, and restore job intervals for log shipping you have to analyze the amount of data that is being log

shipped. The amount of log shipped data is affected by the daily amount of change in the content databases. The percentage of change can vary

greatly, depending on the content, maintenance changes and usage peaks.

To get an accurate percentage of change you have to calculate the sum of changes in the transaction log backups for each content database that

you log ship over a given interval. Use this data to calculate the percentage of change compared to the primary database.

The following guidance is derived from the field’s log shipping experience with several releases of SharePoint Server.

Avoid performance degradation due to all jobs starting at the same time by making sure that all log shipping jobs are offset with at least a 1

minute shift from the previous job.

It is better to back up and copy many small transaction logs instead of a few large transaction logs.

Schedule log backups and copying at frequent intervals. You can restore the transaction logs at less-frequent intervals. For example, start by

using backup and copy intervals of 5 minutes, and a restore interval of 15 minutes.

Skills and experience[38]

In this hybrid disaster recovery solution multiple technologies are used. To make sure that these technologies interact as expected each

component in the on-premises and Windows Azure environment must be installed and configured correctly. We recommend that the person or

team who sets up this solution has a strong working knowledge of, and hands-on skills with the following technologies:

Finally, we recommend scripting skills that you can use to automate tasks associated with these technologies. It is possible to use the available

user interfaces to complete all the tasks described in this solution. However, a manual approach is time consuming, error prone, and delivers

inconsistent results.

In addition to Windows PowerShell there are also Windows PowerShell libraries for SQL Server, SharePoint Server and Windows Azure. Don’t

forget T-SQL, which can also reduce the time needed to configure and maintain your disaster recovery environment.

The log shipping infrastructure[39]

The log shipping infrastructure that is needed for this disaster recovery solution is shown in the following figure.

Figure 13: Log shipping infrastructure and data flow

The preceding image shows the log shipping infrastructure and data flow. This picture shows the SQL Server database servers and the file servers

in the production farm and the Windows Azure recovery farm. These farms are nearly identical and each contains a primary and secondary replica

for each AlwaysOn availability group. The file servers, FIL1 and AZ-FIL1 are configured the same, especially the number of hard disks and disk

sizes.

To provide high availability each replica in an availability group stores a backup (full, differential, and transaction logs) of the other replica.

The primary and secondary replicas (SQL-HA1 and SQL-HA2) each make backups that are stored on its partner in the availability group.

Transaction log shipping is configured on the secondary replica to minimize the impact of backups on the production databases. These

transaction logs are written to a shared folder on the on-premises file server (FIL1). The Windows Server Distributed File System (DFS)

Page 13: SharePoint Server 2013 Disaster Recovery in Windows Azure

Replication Service copies the transaction logs from FIL1 to AZ-FIL1. The transaction logs on AZ-FIL1 are restored to AZ-SQL-HA1, the primary

replica for the availability group in the recovery farm.

Steps required to configure and validate log shipping[40]

The steps required to configure, run, and validate log shipping are condensed and summarized in the following list.

1. Take database backups

1. Configure Full and Differential backups to a local folder and also a shared folder on the file server

2. Verify backups are made to both local share and shared folder

2. Set up and test Distributed File System (DFS) Replication

1. Create Namespace and Replication to transfer transaction logs and backup files between the on-premises and Windows Azure farms on the

shared folder in file server

2. Verify all transfers after log shipping runs

3. Set up and test log shipping

1. Set up log shipping on primary database server – use the following script: Primary- Logshippingsetupparameter

SET NOCOUNT ON

USE MSDB

GO

--@PrimServer : Primary Server name

--@SecServer : DR/Secondary Server Name

--@SecInstance : DR/Secondary FQDN

--@Domain : Domain Name

--@BkpDrive : Production Backup server Name

--@DBName : DatabaseName

DECLARE @LS_BackupJobIdAS uniqueidentifier, @LS_PrimaryIdAS uniqueidentifier , @SP_Add_RetCode As int

DECLARE @Time as nvarchar(10),@SecInstance as nvarchar(250), @PrimServer as nvarchar(50),@SecServer as nvarchar(50),

@Domain as nvarchar(50),@DBName as nvarchar(max),@BkpDrive as nvarchar(250),@CMD as nvarchar(max),@Counter int

----------------------------------------------------------------------------

IF OBJECT_ID ('tempdb.DBO.#LogShipping','U') IS NOT NULL DROP TABLE #LogShipping

Create table #LogShipping ( LSDBs nvarchar(max))

Set @PrimServer ='038-CH1SPSQ01'

Set @SecServer ='038-SN1SSSQ01'

Set @SecInstance ='038-SN1SSSQ01.038d.mgd.msft.net'

Set @Domain ='038d.mgd.msft.net'

Set @BkpDrive ='038-CH1SPBK01.038d.mgd.msft.net'

Set @DBName = 'Social_DB'

Set @Time = '0130'

SET @DBName = UPPER(REPLACE(@DBName, ' ', ''))

SET @DBName = '''' + REPLACE(@DBName, ',', ''', ''') + ''''

Set @CMD = ' Select ' +

'''DECLARE @SP_Add_RetCode As int, @LS_BackupJobIdAS uniqueidentifier, @LS_PrimaryIdAS uniqueidentifier

EXEC @SP_Add_RetCode = master.dbo.sp_add_log_shipping_primary_database ' + CHAR(10) +

'@database = '''''' + db.Name + ''''''' + CHAR(10) +

',@backup_directory = ''''\\' + @BkpDrive + '\LS\' + ''' + db.Name + ''''' + '''' + CHAR(10) +

',@backup_share = ' + '''''\\' + @BkpDrive + '\LS\' + ''' + db.Name + ''''' + '''' + CHAR(10) +

',@backup_job_name = ''''' + 'LSBackup_' + ''' + db.Name + ''''' + '''' + CHAR(10) +

',@backup_retention_period = 4320

,@backup_compression = 1

,@backup_threshold = 180

,@threshold_alert_enabled = 1

,@history_retention_period = 5760

,@backup_job_id = @LS_BackupJobId OUTPUT

,@primary_id = @LS_PrimaryId OUTPUT

Page 14: SharePoint Server 2013 Disaster Recovery in Windows Azure

,@overwrite = 1 ' +

'IF (@@ERROR = 0 AND @SP_Add_RetCode = 0)

BEGIN

DECLARE @LS_BackUpScheduleUIDAs uniqueidentifier ,@LS_BackUpScheduleIDAS int

EXEC msdb.dbo.sp_add_schedule

@schedule_name = ''''' + 'LSBackupSchedule_'+ @PrimServer + '_' + ''' + db.Name + ''''' + '''' + CHAR(10) +

',@enabled = 1

,@freq_type = 4

,@freq_interval = 1

,@freq_subday_type = 4

,@freq_subday_interval = 13

,@freq_recurrence_factor = 0

,@active_start_date = 20090506

,@active_end_date = 99991231

,@active_start_time = ' + @Time + CHAR(10) +

',@active_end_time = 235900

,@schedule_uid = @LS_BackUpScheduleUID OUTPUT

,@schedule_id = @LS_BackUpScheduleID OUTPUT

EXEC msdb.dbo.sp_attach_schedule @job_id = @LS_BackupJobId ,@schedule_id = @LS_BackUpScheduleID

EXEC msdb.dbo.sp_update_job @job_id = @LS_BackupJobId ,@enabled = 1

END

EXEC master.dbo.sp_add_log_shipping_alert_job

EXEC master.dbo.sp_add_log_shipping_primary_secondary

@primary_database = ''' + ''''' + db.Name + ''''' + '''' + CHAR(10) +

',@secondary_server = ''''' + @SecInstance + '''''' + CHAR(10) +

',@secondary_database = ''' + ''''' + db.Name + ''''' + '''' + CHAR(10) +

',@overwrite = 1 ''' +

' [LSDBs] FROM sys.databases db where name in (' + @DBName + ')' +

'and db.name not in (''master'',''model'',''msdb'',''tempdb'',''metricsops'',''periscope'' )

and Not (exists (select lss.Secondary_database from msdb.dbo.log_shipping_Secondary_databases lss where db.Name = lss.Secondary_database)

or exists (select lsp.primary_database from msdb.dbo.log_shipping_primary_databases lsp where db.Name = lsp.primary_database)

)'

Insert #LogShipping (LSDBs)

Exec ( @CMD)

Set @Counter = @@rowcount

While (@counter > 0)

Begin

select top 1 @CMD = LSDBs from #LogShipping

exec sp_executesql @CMD

set @counter = @counter - 1

delete top (1) from #LogShipping

End

IF OBJECT_ID ('tempdb.DBO.#LogShipping','U') IS NOT NULL DROP TABLE #LogShipping

-- ****** End: Script to be run at Primary: [DB1-PSMSQL-01] ******

2. Set up log shipping on secondary database server – use the following script: Secondary-Logshippingsetupparameter scripts

-- ****** Begin: Script to be run at Secondary: 9.3 BUILD******

SET NOCOUNT ON

USE MSDB

GO

--@PrimServer : Primary Server name

--@SecServer : DR/Secondary Server Name

--@SecInstance : DR/Secondary FQDN

--@Domain : Domain Name

Page 15: SharePoint Server 2013 Disaster Recovery in Windows Azure

--@PrimaryBkpDrive : Production Backup server Name

--@BkpDrive : Seconadary Backup server Name

--@DBName : DatabaseName

DECLARE @LS_BackupJobIdAS uniqueidentifier, @LS_PrimaryIdAS uniqueidentifier , @SP_Add_RetCode As int

DECLARE @Time as nvarchar(10),@SecInstance as nvarchar(250), @PrimServer as nvarchar(50),@SecServer as nvarchar(50),

@Domain as nvarchar(50),@DBName as nvarchar(max),@PrimaryBkpDrive as nvarchar(250),@BkpDrive as nvarchar(250),@CMD as nvarchar(max),@CMD2 as nvarchar(max),@Counter int

DECLARE @Delimeter char(1),@DB nvarchar(200), @StartPos int, @Length int

IF OBJECT_ID ('tempdb.DBO.#LogShipping','U') IS NOT NULL DROP TABLE #LogShipping

Create table #LogShipping ( LSDBs nvarchar(max))

IF OBJECT_ID ('tempdb.DBO.#DBs','U') IS NOT NULL DROP TABLE #DBs

Create TABLE #DBs (Name nvarchar(200))

Set @PrimServer ='038-CH1SPSQ01'

Set @SecServer ='038-SN1SSSQ01'

Set @SecInstance ='038-SN1SSSQ01.038d.mgd.msft.net'

Set @Domain ='038d.mgd.msft.net'

SET @PrimaryBkpDrive = '038-CH1SPBK01.038d.mgd.msft.net'

Set @BkpDrive ='038-SN1SSBK01.038d.mgd.msft.net'

Set @DBName = 'Social_DB'

Set @Time = '0130'

--Parsing Function

SET @Delimeter = ','

WHILE LEN(@DBName) > 0

BEGIN

SET @StartPos = CHARINDEX(@Delimeter, @DBName)

IF @StartPos < 0 SET @StartPos = 0

SET @Length = LEN(@DBName) - @StartPos - 1

IF @Length < 0 SET @Length = 0

IF @StartPos > 0

BEGIN

SET @DB = Rtrim(Ltrim(SUBSTRING(@DBName, 1, @StartPos - 1)))

SET @DBName = SUBSTRING(@DBName, @StartPos + 1, LEN(@DBName) - @StartPos)

END

ELSE

BEGIN

SET @DB = Rtrim(Ltrim(@DBName))

SET @DBName = ''

END

INSERT #DBs (Name) VALUES(@DB)

END

--SET @DBName = UPPER(REPLACE(@DBName, ' ', ''))

--SET @DBName = '''' + REPLACE(@DBName, ',', ''', ''') + ''''

Set @CMD = 'Select ' +

''' DECLARE @LS_Secondary__CopyJobId AS uniqueidentifier, @LS_Secondary__RestoreJobId AS uniqueidentifier ,@LS_Secondary__SecondaryId AS uniqueidentifier , @LS_Add_RetCode As int ,@LS_Add_RetCode2 As int

DECLARE @LS_SecondaryCopyJobScheduleUIDAs uniqueidentifier ,@LS_SecondaryCopyJobScheduleIDAS int, @LS_SecondaryRestoreJobScheduleUIDAs uniqueidentifier ,@LS_SecondaryRestoreJobScheduleIDAS int

EXEC @LS_Add_RetCode = master.dbo.sp_add_log_shipping_secondary_primary

@primary_server = ''''' + @PrimServer + ''''''+ CHAR(10) +

',@primary_database = '' + ' + ''''''''' + db.Name + ''''''''' + CHAR(10) +

' + '',@backup_source_directory = ' + '''''\\' + @PrimaryBkpDrive + '\LS\'' + db.Name + ''''''' + CHAR(10) +

' ,@backup_destination_directory = ' + '''''\\' + @BkpDrive + '\LS\'' + db.Name + ''''''' + CHAR(10) +

',@copy_job_name = ''''LSCopy_DB1-PSMSQL-01_'' + db.Name + ''''''' + CHAR(10) +

',@restore_job_name = ''''LSRestore_'+ @PrimServer + '_'' + db.Name + ''''''' + CHAR(10) +

',@file_retention_period = 4320

,@overwrite = 1

,@copy_job_id = @LS_Secondary__CopyJobId OUTPUT

Page 16: SharePoint Server 2013 Disaster Recovery in Windows Azure

,@restore_job_id = @LS_Secondary__RestoreJobId OUTPUT

,@secondary_id = @LS_Secondary__SecondaryId OUTPUT

IF (@@ERROR = 0 AND @LS_Add_RetCode = 0)

BEGIN

EXEC msdb.dbo.sp_add_schedule

@schedule_name =''''DefaultCopyJobSchedule''''

,@enabled = 1

,@freq_type = 4

,@freq_interval = 1

,@freq_subday_type = 4

,@freq_subday_interval = 15

,@freq_recurrence_factor = 0

,@active_start_date = 20090506

,@active_end_date = 99991231

,@active_start_time = ' + @Time + '

,@active_end_time = 235900

,@schedule_uid = @LS_SecondaryCopyJobScheduleUID OUTPUT

,@schedule_id = @LS_SecondaryCopyJobScheduleID OUTPUT

EXEC msdb.dbo.sp_attach_schedule

@job_id = @LS_Secondary__CopyJobId

,@schedule_id = @LS_SecondaryCopyJobScheduleID

EXEC msdb.dbo.sp_add_schedule

@schedule_name =''''DefaultRestoreJobSchedule''''

,@enabled = 1

,@freq_type = 4

,@freq_interval = 1

,@freq_subday_type = 4

,@freq_subday_interval = 15

,@freq_recurrence_factor = 0

,@active_start_date = 20090506

,@active_end_date = 99991231

,@active_start_time = ' + @Time + '

,@active_end_time = 235900

,@schedule_uid = @LS_SecondaryRestoreJobScheduleUID OUTPUT

,@schedule_id = @LS_SecondaryRestoreJobScheduleID OUTPUT

EXEC msdb.dbo.sp_attach_schedule

@job_id = @LS_Secondary__RestoreJobId

,@schedule_id = @LS_SecondaryRestoreJobScheduleID

END

IF (@@ERROR = 0 AND @LS_Add_RetCode = 0)

BEGIN

EXEC @LS_Add_RetCode2 = master.dbo.sp_add_log_shipping_secondary_database

@secondary_database = ' + ''''''' + db.Name + ''''''' + CHAR(10) + '

,@primary_server = ''''' + @PrimServer + '''''

,@primary_database = '+ ''''''' + db.Name + ''''''' + CHAR(10) +

',@restore_delay = 0

,@restore_mode = 1

,@disconnect_users= 1

,@restore_threshold = 180

,@threshold_alert_enabled = 1

,@history_retention_period= 5760

,@overwrite = 1

END

IF (@@error = 0 AND @LS_Add_RetCode = 0)

BEGIN

EXEC msdb.dbo.sp_update_job @job_id = @LS_Secondary__CopyJobId ,@enabled = 0

EXEC msdb.dbo.sp_update_job @job_id = @LS_Secondary__RestoreJobId ,@enabled = 1

END ''' + '[LSDBs] FROM #DBs db'

Page 17: SharePoint Server 2013 Disaster Recovery in Windows Azure

--Print @CMD

Insert #LogShipping (LSDBs)

Exec ( @CMD)

Set @Counter = @@rowcount

While (@counter > 0)

Begin

select top 1 @CMD = LSDBs from #LogShipping

exec sp_executesql @CMD

set @counter = @counter - 1

delete top (1) from #LogShipping

End

IF OBJECT_ID ('tempdb.DBO.#LogShipping','U') IS NOT NULL DROP TABLE #LogShipping

IF OBJECT_ID ('tempdb.DBO.#DBs','U') IS NOT NULL DROP TABLE #DBs

-- ****** End: Script to be run at Secondary: 9.3 Build ******

3. Verify that the transaction logs are shipped to the share and that DFS is replicating these logs to the share on the Windows Azure file

server. Open the Job Activity Monitor in SQL Server to verify the transaction logs are shipped successfully. Open the shared folders on both

file servers in the production and Windows Azure farms to verify DFS is transferring the transaction logs.

Phase 6: Validate failover and recovery[41]

The goal of this final phase is to verify that the disaster recovery solution works as planned. In order to do this you have to create a failover event

that shuts down the production farm and starts up the recovery farm as a replacement. You can start a failover scenario manually or by using

scripts.

The first step is to stop incoming user requests for farm services or content. You can do this by disabling DNS or by shutting down the front end

Web servers. After the farm is ‘down’ you can failover to the recovery farm.

Stop log shipping[42]

Log shipping must be stopped before farm recovery. The log shipping on the secondary server must be stopped first and then it must be stopped

on the primary server. Use the following script to stop log shipping on the secondary server first and then the primary server.

-- Removes Log Shipping from server

-- Commands must be executed on the Secondary server FIRST, then the Primary

SET NOCOUNT ON

DECLARE @PriDB nvarchar(max)

,@SecDB nvarchar(250)

,@PriSrv nvarchar(250)

,@SecSrv nvarchar(250)

Set @PriDB= ''

SET @PriDB = UPPER(@PriDB)

SET @PriDB = REPLACE(@PriDB, ' ', '')

SET @PriDB = '''' + REPLACE(@PriDB, ',', ''', ''') + ''''

Set @SecDB = @PriDB

Exec ( 'Select ''exec master..sp_delete_log_shipping_secondary_database '' + '''''''' + prm.primary_database + ''''''''

from msdb.dbo.log_shipping_monitor_primary prm INNER JOIN msdb.dbo.log_shipping_primary_secondaries sec ON prm.primary_database=sec.secondary_database

where prm.primary_database in ( ' + @PriDB + ' )')

Exec ( 'Select ''exec master..sp_delete_log_shipping_primary_secondary '' + '''''''' + prm.Primary_Database + '''''', '''''' + sec.Secondary_Server + '''''', '''''' + sec.Secondary_database + ''''''''

from msdb.dbo.log_shipping_monitor_primary prm INNER JOIN msdb.dbo.log_shipping_primary_secondaries sec ON prm.primary_database=sec.secondary_database

where prm.primary_database in ( ' + @PriDB + ' )')

Page 18: SharePoint Server 2013 Disaster Recovery in Windows Azure

Exec ( 'Select ''exec master..sp_delete_log_shipping_primary_database '' + '''''''' + prm.primary_database + ''''''''

from msdb.dbo.log_shipping_monitor_primary prm INNER JOIN msdb.dbo.log_shipping_primary_secondaries sec ON prm.primary_database=sec.secondary_database

where prm.primary_database in ( ' + @PriDB + ' )')

Exec ( 'Select ''exec master..sp_delete_log_shipping_secondary_primary '' + '''''''' + prm.primary_server + '''''', '''''' + prm.primary_database + ''''''''

from msdb.dbo.log_shipping_monitor_primary prm INNER JOIN msdb.dbo.log_shipping_primary_secondaries sec ON prm.primary_database=sec.secondary_database

where prm.primary_database in ( ' + @PriDB + ' )')

Restore the backups[43]

Ensure that you meet the following prerequisites for restoring backups:

Backups must be restored in the order in which they were created. Before you can restore a particular transaction log backup, you must first

restore the following previous backups without rolling back uncommitted transactions (that is WITH NORECOVERY).

The full database backup and the last differential backup, if any, taken before the particular transaction log backup. Before the most recent full

or differential database backup was created, the database must have been using the full recovery model or bulk-logged recovery model.

All transaction log backups taken after the full database backup or the differential backup (if you restore one) and before the particular

transaction log backup. Log backups must be applied in the sequence in which they were created, without any gaps in the log chain.

To recover the content database on the secondary server so that the sites render, all database connections must be removed before recovery. To

restore the database, run the following command-SQL statement:

restore database WSS_Content with recovery

Visual C++

When you use T-SQL explicitly specify either WITH NORECOVERY or WITH RECOVERY in every RESTORE statement to eliminate ambiguity.

This is very important when writing scripts. After the full and differential backups are restored, the transaction logs can be restored in SQL

Server Management Studio. Also, because log shipping is already stopped the content database is in a standby state, so you must change the

state to Full Access.

In Management Studio, right click the WSS_Content database, point to Tasks, Restore, and then click Transaction Log, if you have not restored

the full backup then this will not be available. For more information, see Restore a Transaction Log Backup[44].

Crawl the content source[45]

You must start a full crawl for each content source to restore the Search Service. Note that you lose some analytics information from the on-

premises farm, such as search recommendations. (If you require full analytics influences, you must do regular backup and restore operations on

the Search service application.) Before starting the full crawls, use the Windows PowerShell cmdlet, Restore-

SPEnterpriseSearchServiceApplication and specify the log shipped and replicated Search Administration database,

Search_Service__DB_<GUID>. This cmdlet gives the search configuration, schema, managed props, rules, sources, and creates a default set of the

other components.

To start a full crawl, follow these steps:

1. In the SharePoint 2013 Central Administration go to Application Management > Service Applications > Manage service applications and

click the Search service application that you want to crawl.

2. On the Search Administration page click Content Sources, point to the content source that you want, click the arrow and then click Start

Full Crawl.

Recover farm services[46]

The following table shows how to recover services that have log shipped databases, the services that have databases but are not recommended to

restore these with log shipping, and the services that do not have databases.

Table: Service application database reference

Page 19: SharePoint Server 2013 Disaster Recovery in Windows Azure

Restore these services from log-shipped databases These services have databases but we recommend

that you start this services without restoring their

databases

These services do not store data in

databases. Start these services after

failover

Machine Translation Service

Managed Metadata Service

Secure Store Service

User Profile

Note:

Only the Profile and Social Tagging databases

are supported. The Synchronization database is

not supported.

Microsoft SharePoint Foundation Subscription

Settings Service

Usage and Health Data Collection

State service

Word automation

Excel Services

PerformancePoint Services

PowerPoint Conversion

Visio Graphics Service

Work Management

The following example shows how to restore the Managed Metadata service from a database:

This will use the existing Managed_Metadata_DB database. This database is log shipped, but there is no active service application on the

secondary farm so it needs to be connected once the service application is in place.

First, use new-spmanagedmetadataserviceapplication specifying the -database switch with the name, of the restored database.

Next, configure the new Managed Metadata Service Application on the secondary server as follows:

Name: Managed Metadata Service

Database server: Use the database name from the shipped transaction log

Database name: Managed_Metadata_DB

Application Pool: SharePoint Service Applications

Manage DNS records[47]

You have to create DNS records manually to point to your SharePoint farm.

In most cases where you have multiple web-front-end servers, it makes sense to take advantage of the Network Load Balancing feature in

Windows Server 2012 or a hardware load balancer to distribute requests among the web-front-end servers in your farm. Network load balancing

can also help reduce risk: if one of your web-front-end servers fails, NLB can distribute requests to the other servers.

Typically, when you set up network load balancing, your cluster is assigned a single IP address. You then create a DNS host record in the DNS

provider for your network that points to the cluster. (For this project, we put a DNS server in Azure for resiliency in the case of an on-premises

datacenter failure.) For instance, you can create a DNS record, in DNS Manager in Active Directory, called http://sharepoint.contoso.com that

points to the IP address for your load-balanced cluster.

For external access to your SharePoint farm, you can create a host record on an external DNS server with the same URL that clients use on your

intranet, for example http://sharepoint.contoso.com that points to an external IP address in your firewall. (A best practice in this case is to set up

split DNS, so your internal DNS server is authoritative for contoso.com and routes requests directly to the SharePoint farm cluster, rather than

routing DNS requests to your external DNS server.) You can then map the external IP address to the internal IP address of your on-premises

cluster so clients find the resources they’re looking for.

From here, you can run into a couple different disaster-recovery scenarios:

The on-premises SharePoint farm is unavailable, because of hardware failure in the on-premises SharePoint farm, for example. In this

case, after you completed the steps for fail over to the Windows Azure SharePoint farm, you can configure network load balancing on the recovery

SharePoint farm’s web-front end servers, the same way you did with the on-premises farm. You can then redirect the host record in your internal

DNS provider to point to the recovery farm’s cluster IP address. Note that it can take some time before cached DNS records on clients are

refreshed and point to the recovery farm.

The on-premises datacenter is lost completely. This can occur because of a natural disaster like a fire or flood. In this case, for an enterprise,

you’d likely have a secondary datacenter hosted in another region, as well as your Azure subnet that has its own directory services and DNS. As in

the previous disaster scenario, you can redirect your internal and external DNS records to point to the Azure SharePoint farm. Again, take note

Page 20: SharePoint Server 2013 Disaster Recovery in Windows Azure

1. http://go.microsoft.com/fwlink/p/?LinkId=392554

2. http://go.microsoft.com/fwlink/p/?LinkId=392555

3. javascript:void(0)

4. http://go.microsoft.com/fwlink/?LinkID=393114

5. http://go.microsoft.com/fwlink/p/?linkid=203228

6. javascript:void(0)

7. javascript:void(0)

8. javascript:void(0)

9. javascript:void(0)

10. javascript:void(0)

11. http://technet.microsoft.com/en-us/library/dn635309(v=office.15).aspx

12. javascript:void(0)

13. javascript:void(0)

14. javascript:void(0)

15. javascript:void(0)

16. javascript:void(0)

17. http://go.microsoft.com/fwlink/p/?linkid=270985

18. javascript:void(0)

19. javascript:void(0)

20. javascript:void(0)

21. javascript:void(0)

22. http://go.microsoft.com/fwlink/?LinkId=392687

23. javascript:void(0)

24. http://go.microsoft.com/fwlink/?LinkId=392691

25. http://go.microsoft.com/fwlink/p/?linkid=270985

26. javascript:void(0)

27. http://go.microsoft.com/fwlink/?LinkId=392732

28. http://go.microsoft.com/fwlink/?LinkId=392737

29. http://go.microsoft.com/fwlink/?LinkId=392738

30. http://go.microsoft.com/fwlink/?LinkId=392739

31. http://go.microsoft.com/fwlink/?LinkId=392740

32. javascript:void(0)

33. http://go.microsoft.com/fwlink/?LinkId=392694

34. http://go.microsoft.com/fwlink/?LinkId=392695

35. http://go.microsoft.com/fwlink/?LinkId=392693

36. javascript:void(0)

37. javascript:void(0)

38. javascript:void(0)

39. javascript:void(0)

40. javascript:void(0)

41. javascript:void(0)

that DNS-record propagation can take some time.

If you’re using host-named site collections, as recommended in Host-named site collection architecture and deployment (SharePoint 2013)[48],

you might have several site collections hosted by the same web application in your SharePoint farm, with unique DNS names like

http://sales.contoso.com and http://marketing.contoso.com. In this case, you can create DNS records for each site collection that point to your

cluster IP address. Once a request reaches your SharePoint web-front-end servers, they handle routing each request to the appropriate site

collection.

Page 21: SharePoint Server 2013 Disaster Recovery in Windows Azure

42. javascript:void(0)

43. javascript:void(0)

44. http://go.microsoft.com/fwlink/?LinkId=392778

45. javascript:void(0)

46. javascript:void(0)

47. javascript:void(0)

48. http://go.microsoft.com/fwlink/?LinkId=393120

Page 22: SharePoint Server 2013 Disaster Recovery in Windows Azure