Implementing Business Continuity: Backup & Restore strategy

  • Implementing a Backup Strategy
  • Implementing a Restore Strategy

A. Implementing a Backup Strategy
A. 1. Backing Up Sharepoint Using Central Administration
A. 1. 1. Create a backup share
  1.  Log on to SP2010-WFE1 as Contoso\SP_Admin with password.
  2. Open Windows Explorer and then browse to the C Drive.
  3. In the toolbar, click New Folder
  4. Type SharepointBackup, and then press ENTER.
  5. Right-click SharepointBackup, and then click Properties
  6. Click the Security tab
  7. Click Edit
  8. In the Group or user names list, select Users.
  9. Select the Allow check box next to Full Control
  10. Click OK
  11. Click the Sharing tab
  12. Click Advanced Sharing
  13. Select the Share this folder check box
  14. Click Permissions
  15. Select Allow check box next to Full Control
  16. Click OK
  17. Click OK
  18. Click Close.
 A. 2. Back up a Web Application with Central Administration
  1. Open Sharepoint 2010 Central Administration. The User Account Control dialog box appears.
  2. Click Yes.
  3. In the Quick Launch, click Backup and Restore.
  4. In the Farm Backup and Restore section, click Perform a Backup. The Perform a Backup - Step 1 02 2: Select Component to Back Up page opens.
  5. Observe the components that can be backed up.
    • Farm
    • Various solutions and services
    • Microsoft Office InfoPath Forms Services
    • Sharepoint Server State Service
    • Microsoft Sharepoint Foundation Web Application(s)
    • WSS_Administration
    • Sharepoint Server State Service Proxy
    • SPUserCodeV4
    • Global Search Settings
    • Application Registry Service
    • Shared Services
  6. Select the Sharepoint - intranet.contoso.com80 check box.
  7. Click Next. The Perform a Backup - Step 2 of 2: Select Backup Options page opens.
  8. In the Backup Type section, click Full.
  9. In the Backup location box, type \\SP2010-WFE1.contoso.com\SharepointBackup
  10. Click Start Backup
    Refresh the page
  11. Wait until Phase shows as Completed.
A. 3. Investigating Sharepoint Backup Logs and Files
A. 3. 1. Examine the backup folder
  1. Switch to Windows Explorer, and then open the C:\SharepointBackup folder.
  2. Right-click Spbrtoc.xml, and then click Edit.
  3. Examine the file, which is similar to the following:

    <?xml version="1.0" encodin="utf-8"?>
    <SPBackupREstoreHistory>
           <SPHistoryObject>
                  <SPId>GUID of operation/SPId>              <SPRequestedBy>CONTOSO\SP_Admin</SPRequestedBy>
                  <SPBackupMethod>Full</SPBackupMethod>
                  <SPRestoreMethod>None</SPRestoreMethod>
                  <SPStartTime>Start Date and time</SPStartTime>
                  <SPFinishTime>End Date and time</SPFinishTime>
                  <SPIsBackup>True</SPIsBackup>
                  <SPConfigurationOnly>False</SPConfigurationOnly>
                  <SPBackupDirectory>\\SP2010-WFE1,contoso.com\SharepointBackup\
                           spbr0000\</SPBackupDirectory>
                 <SPDirectoryName>spbr0000</SPDirectoryName>
                 <SPDirectoryNumber>0 </SPDirectoryNumber>
                 <SPTopComponent>Farm\Microsoft Sharepoint Foundation Web Application\
                          Sharepoint - intranet.contoso.com80</SPTopComponent>
                <SPTopComponentId>GUID of top component</SPTopComponentId>
               <SPWarningCount>1</SPWarningCount>
               <SPErrorCount>0</SPErrorCount>
         </SPHistoryObject>
    </SPBackupRestoreHistory>
  4. Locate the SPHistoryObject element.
     This element describes the backup operation, and is used during a restore operation.
  5. Locate  the SPBackupDirectory element.
    This element is a reference to the folder in which the backup files are stored.
  6. Locate the SPWarningCount and SPErrorCount elements.
    These elements report warnings and errors.
  7. Close Microsoft notepad.
  8. In Windows Explorer, open the spbr000 folder.
  9. Observer the backuup (*.bak) files in the folder.
  10. Right-click Spbackup.xml, and then click Edit.
  11. Examine the Spbackup.xml, and then click Edit. This file contains attributes related to the backup operation and to each of the components. It is used during a restore operation. You should not modify, delete, or rename the Spbackup.xml file.
  12. Close Notepad.
A. 3. 2. Identify backup warnings and errors in the backup log
  1. Double-click spbackup.log.
  2. Examine the log. Observe that each of the backup operations is listed, including the T-SQL commands that were sent to Microsoft SQL Server.
  3. Press CTRL+END to navigate to the end of the log.
  4. Observe that last lines of the log, which indicate that the backup completed and summarizes the number of warnings and errors.
  5. Press CTRL+Home to navigate to the top of the log.
  6. Press CTRL+F, type Warning, and then press ENTER.
  7. Write down the warning message
  8. Press CTRL+Home to navigate to the top of the log.
  9. Press CTRL+F , then type BACKUP DATABASE and then press ENTER.
  10. Observe the command that was sent to SQL Server to back up on of the Sharepoint databases.
  11. Press F3 to find the next instance of the text, "Backup Database," Repeat this step as necessary to locate the backup command that was used to back up the WSS_Content_Intranet_IT database.
  12. Close Notepage.
A. 4. Automating Sharepoint Backup Using Windows Powershell
A. 4. 1. Create a backup script
  1. Open Windows Explorer and then browse to the C drive.
  2. In the toolbar, click New Folder.
  3. Type Scripts, and then press ENTER.
  4. Open Notepad.
  5. Type the following text:
    Add-PSSnapin Microsoft.Sharepoint.Powershell
    Backup-SPFarm -directory \\SP2010-WFE1.contoso.com\SharepointBackup -backupmethod full
  6. Click File, and then click Save.
  7. In the File name box, type C:\scripts\backup.ps1, and then press ENTER
  8. Minimize, but do not close Notepad.
A. 4. 2. Schedule the backup script
  1. Click Start, point to Administrative Tools, and then click Task Scheduler.
  2. In the Actions panel, click Create Basic Task.
  3. On the Create Basic Task page, in the Name box, type Backup Sharepoint - Full
  4. In the Description box, type Back up the Sharepoint farm
  5. Click Next
  6. On the Trigger page, click Daily
  7. Click Next
  8. On the Daily page, configure the Start time to 1:00AM
  9. Click Next.
  10. On the Action page, click Start a program.
  11. Click Next
  12. On the Start a Program page, in the Program/script box, type Powrshell.exe
  13. In the Add arguments (optional) box, type C:\Scripts\backup.ps1
  14. Click Next
  15. On the Summary page, select the Open the Properties dialog for this task when I click Finish check box.
  16. Click Finish
  17. Click Change User or Group.
  18. Type CONTOSO\SP_Farm and then click OK
  19. On the General tab, in the Security options section, click Run whether user is logged on or not
  20. Select the Run with highest privileges check box.
  21. Click OK.
  22. In the Password box, type its password.
  23. Click OK.
A. 4. 3. Test the scheduled backup task
  1. In the console tree, click Task Scheduler Library
  2. Right-click Backup Sharepoint - Full, and then click Run.
  3. Open the C:\SharepointBackup folder.
  4. Observe that a new backup folder, spbr0001 is created.
A. 4. 4. Monitor the backup operation.
  1.  Switch to Sharepoint 2010 Central Administration
  2. In the Quick Launch, click Backup and Restore.
  3. Click Check backup and restore job status.
  4. Examine the information that is presented on the Backup and Restore Job Status page.
  5. Click View History
  6. Examine the information that is presented on the Backup and Restore History page
  7. Click Backup and Restore Job Status to return to the status page
  8. Wait for the Phase to be Completed before continuing to the next step.
B. Implementing a Restore Strategy
B. 1. Restoring a Web Application Using Central Administration
B. 1. 1. Delete a Web Application
  1. Switch to Sharepoint 2010 Central Administration
  2. In the Quick Launch, click Application Management
  3. In the Web Applications section, click Manage Web applications
  4. Select the row, Sharepoint - intranet.contoso.com80
  5. On the ribbon, click Delete.
  6. The Delete Web Application page opens.
  7. In the Delete content database section, click Yes.
  8. In the Delete IIS Web Sites section, click Yes.
  9. Click Delete. A confirmation message appears.
  10. Click OK. The Web application is deleted.
B. 1. 2. Test the deleted Web application
  1. Open Internet Explorer.
  2. In the address bar, type http://intranet.contoso.com, and then press ENTER. An error page opens.
B. 1. 3. Restore a Web Application using Central Administration
  1.  Switch to Sharepoint 2010 Central Administration.
  2. In the Quick Launch, click Backup and Restore.
  3. In the Farm Backup and Restore section, click Restore from a backup.
    The Restore from backup - Step 1 of 3 page opens.
  4. Select the radio button next to Farm in the first (oldest) backup.
  5. Click Next. The Restore from backup - Step 3 of 3 page opens.
  6. Select the check box next to Sharepoint - intranet.contoso.com80.
  7. Click Next.
  8. In the Restore Options box, click Same configuration.
  9. Click OK.
  10. In the Login Names and Passwords section, in the Password box, type its password.
  11. Click Start Restore. A timer job is created to perform the restore of the selected item(s).
  12. Wait until Phase shows as Completed
 B. 1. 4. Verify the restored Web Application
  1.  Switch to the instance of Internet Explorer that displays the error page from step B.1.2.
  2. In the address bar, type http://intranet.contoso.com and then press ENTER.
 B. 2. Investigating Sharepoint Restore Logs and Files
 B. 2. 1. Examine the backup folder
  1.  Open the C:\sharepointbackup folder.
  2. Right-click Spbrtoc.xml and then click Edit.
  3. Examine the file, and identify the SPHistoryObject element that describes the restore operation.
  4. Locate the SPRestoreMethod element. This element describes the type of restore operation that was performed.
  5. Locate the SPBackupDirectory element.
  6. Locate the SPTopComponent element.
  7. Locate the SPWarningCount & SPErrorCount elements.
  8. Close Notepage
  9. In Windows Explorer, open the spbr001 folder.
  10. Right-click Sprestore.xml, and then click Edit.
  11. Examine the Sprestore.xml file. This file contains attributes related to the restore operation and to each of the components. You should not modify, delete, or rename the sprestore.xml file.
  12. Close Notepad.
  B. 2. 2. Identify restore warnings and errors in the restore log
  1. Double-click Sprestore.log.
  2. Press CTRL+END to navigate to the end of the log.
  3. Observe the last lines of the log, which indicate that the backup completed and summarizes the number of warnings and errors.
  4. Press CTRL+HOME to navigate to the top of the log.
  5. Press CTRL+F, then type Progress: Starting Restore, and then press ENTER.
  6. In the Find dialog box, in the Find what box, type Warnings, and then press ENTER.
  7. Write down the warning message
  8. Press CTRL+HOME to navigate to the top of the log.
  9. Press CTRL+F, then type Restore Database , and then press ENTER.
  10. Observe the command that was sent to SQL Server to restore one of the Sharepoint databases.
  11. Close Notepad.
  B. 3. Performing a Partial Restore
  B. 3. 1. Restore a content database