Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 11 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
11
Dung lượng
761,02 KB
Nội dung
324 ❘ Chapter 12 Configuring SharePoint 2010 for High Availability Backups Figure 12-12 This section provided the basic information required to understand the methods to both successfully protect and recover content from corruption, accidental deletion, or other loss scenarios If your organization has service-level agreements targeted specifically at content recovery scenarios, you should evaluate all of the options presented here; and through planning and practice, combine these strategies with your overall business continuity requirements, while keeping in mind that although content comprises the majority of information accessed in SharePoint, its protection alone does not provide an adequate disaster-recovery or high-availability solution Testing is imperative to help you make an informed decision about which solution or combination of solutions should be implemented to protect your content Disaster Recovery Disaster recovery is the process and procedures related to preparing for recovery or continuation of technology infrastructure in the event that the primary site where that infrastructure is provided Disaster Recovery ❘ 325 is lost due to natural disaster or some other event, making that site unavailable to continue serving users Disaster recovery processes and procedures are commonly guided by two principles: ➤➤ Recovery point objective (RPO) — RPO is a critical value when planning a business continuity solution and is impacted by factors such as restore duration from backup and replication performance ➤➤ Recovery time objective (RTO) — RTO is important as it dictates the total amount of time required to bring the service back online It should be mapped to any operating-level agreements established with ancillary technologies, such as Directory Services or network infrastructure, as these services will commonly need to be available before you can offer your service to users It is equally important to understand that any reduction in RPO and RTO objectives will often increase the costs associated with the technologies elected to provide the business continuity management solution This section describes several solutions available in SharePoint 2010 to facilitate a business continuity management solution The first step when planning the business continuity management solution is understanding what needs to be recovered in the event of a disaster, keeping in mind that in most cases content comprises a deployment (see also “Content Recovery” in this chapter) Content is the foundation for most service applications and should be prioritized in most solutions — for example, prioritizing the recovery of Search over content provides no value, as Search requires content to crawl to effectively provide value to users An additional consideration that applies in continuity management solutions is the protection of customizations deployed to a server farm environment Some of these customizations can be protected adequately using the functionality provided by SharePoint 2010, but in some cases you will need to catalog, manually protect, or replicate these customizations in the destination server farm environment Backup and Restore for Disaster Recovery SharePoint 2010 provides new and improved tools and capabilities to protect its content, configuration, and customizations, including extending options that were previously available only through the command line to the user interface, new features to provide greater granularity, and overall improvements in performance and resiliency In SharePoint 2010, backup and restore capabilities are distributed across two primary areas of functionality: ➤➤ Farm backup and restore ➤➤ Granular backup Farm backup and restore, also known as catastrophic backup and restore, provides solutions designed to enable you to backup and restore components of a server farm or the entire server farm environment, in addition to providing entry points that enable you to configure backup settings and access backup and restore history 326 ❘ chAPtER 12 coNfigUriNg sharePoiNt 2010 for high availaBility BackUPs In addition to an entire server farm, backup enables you to protect the following components: ➤➤ Configuration databases ➤➤ Web applications, to include settings and content databases ➤➤ Service applications, to include settings and databases where present ➤➤ Services such as InfoPath Forms, State, Application Registry, and User Code Solution services Granular Backup provides solutions designed to enable you to back up site collections, export sites and lists, recover data from unattached content databases, and access backup history In addition to the features provided through SharePoint 2010 Central Administration, SharePoint 2010 continues to provide backup and restore capabilities through both the SharePoint Administration Tool and new capabilities through Windows PowerShell While the SharePoint Administration Tool is still available under %commonprogramfiles%\Microsoft Shared\Web Server Extensions\14\ BIN, we recommend that you use Windows PowerShell when performing command-line administrative tasks The SharePoint Administration Tool has been deprecated, but it is included to support compatibility with previous product versions backing up and Restoring content databases We have already demonstrated that there are many tools in SharePoint 2010 that you can use to accomplish a task You have the option of using Windows PowerShell, the Central Administration website, or even STSADM, if you must Backing up content databases is no different In this section we cover the different ways you can back up your content databases in SharePoint 2010 Backing Up and restoring Content Databases Using Central administration SharePoint 2010 provides improved backup and restore functionality out of the box, including greater granularity, improved monitoring and reporting, and greater scale and efficiency With SharePoint 2010 backup and restore, you can back up one or more content databases in either full or differential mode To back up a content database using SharePoint 2010 Backup and Restore: Open SharePoint 2010 Central Administration and select Perform a backup under Farm Backup and Restore On the Perform a Backup — Step of 2: Select Component to Back Up page, expand the web application where the content database to be backed up is attached and select the content database you want to back up If you want to back up multiple content databases you can only that by backing up the entire web application You can’t back up content databases in different web applications without backing up the whole farm Select the content databases or web applications you want to backup and click Next Disaster recovery ❘ 327 On the Start Backup — Step of 2: Select Backup Options page, in the Backup Type section, select Full In the Backup File Location section, type the Universal Naming Convention (UNC) path of the backup folder, and then click Start Backup Figure 12-13 shows how the fi nal screen will look before the backup is run FIguRE 12-13 To perform a differential backup instead of a full backup, simply select Differential instead of Full as the Backup Type in step of these instructions For more discussion about choosing between full and differential backups, see the “Backing Up and Restoring Content Databases Using Microsoft SQL Server” section coming up shortly 328 ❘ chAPtER 12 coNfigUriNg sharePoiNt 2010 for high availaBility BackUPs Remember that you can view the general status of all backup jobs at the top of the Backup and Restore Job Status page in the Readiness section, and see the status for the current backup job in the lower part of the page in the Backup section To restore a content database using SharePoint 2010 Backup and Restore: Open SharePoint 2010 Central Administration and select Farm Backup and Restore ➪ Restore from a backup On the Restore from Backup - Step of 3: Select Backup to Restore page, specify the Universal Naming Convention (UNC) path of the backup folder if not already populated and click Refresh Select the backup to be restored from the list of available backups and then click Next On the Restore from Backup - Step of 3: Select Restore Options page, select the type of restore to perform in the Restore Options section On the Restore from Backup - Step of 3: Select Component to Restore page, select the component to be restored from the list of available components and then click Next Two options are available, New and Same Configuration: a New Configuration enables an administrator to restore to a farm with a separate computer name, web application settings, or database server If you select New, specify the new naming information in the provided fields b Selecting Same Configuration will overwrite any existing copy of the data In some cases, the desired content databases may not be refl ected in the Central Administration user interface If the content database is not selectable, you must use Windows PowerShell or SQL Server tools to restore it Backing Up and restoring Content Databases Using Windows Powershell New Windows PowerShell support enables you to perform common administrative tasks, apply varying levels of backup, and restore granularity To back up a content database by using Windows PowerShell, enter the following command in the Microsoft SharePoint 2010 Management Shell: Backup-SPFarm -Directory -BackupMethod {Full | Differential} -Item [-Verbose] To restore a content database by using Windows PowerShell, use the following command: Restore-SPFarm -Directory -RestoreMethod Overwrite -Item [-BackupId ] [-Verbose] Disaster recovery ❘ 329 For content databases that have not been previously backed up, you must use the -Full switch Backing Up and restoring Content Databases Using Microsoft sQl server SQL Server provides the greatest scale and selection of backup options available to SharePoint 2010 content databases, including Full, Differential, and Incremental Depending on your specific recovery point and recovery time objectives, you may often be required to combine these options to provide the broadest overall coverage and facilitate rapid recovery of content For example, many enterprises are expected to provide a 21-day, disk-based backup regimen; in this scenario, a combination of three full and 18 differential backups are implemented to meet the requirements and minimize the storage footprint SQL Server provides a number of options and levels of granularity for performing database backups Full backup is the simplest form of backup with SQL Server; it provides database administrators with additional options such as the capability to perform single data fi le or fi legroup backups SharePoint 2010 does not support partitioning schemes, which are required to fully support multiple fi legroups, so these options are not discussed here; however, while SharePoint 2010 supports multiple data fi les, all data fi les should be backed up and restored as a single unit when working with SharePoint 2010 content databases A full database backup provides a complete copy of the content database and provides a “point in time” snapshot to which the database can be restored; however, it does not include the time during which the backup was running This is important to understand in order to meet specific recovery point objectives, due to the increased backup duration that occurs as the size of the database increases Full database backups are the easiest to use and contain all of the data in the content database When working with a small content database of 50GB or less, the usual best practice is to rely on just full database backups However, as noted earlier, as the size of a database increases, so does the duration of the backup; and therefore it takes more time to fi nish and requires more storage space In these cases, the best practice is to supplement full backups with differential backups, in order to ensure efficiency and performance in both backup and restore To perform a full database backup of an individual SharePoint 2010 content database: Open Microsoft SQL Server Management Studio and connect to the appropriate instance of the Microsoft SQL Server Database Engine In Object Explorer, click the server name to expand the server tree Expand Databases, and select a content database from the list of available user databases Right-click the desired content database, and select Tasks ➪ Back Up, as shown in Figure 12-14 330 ❘ Chapter 12 Configuring SharePoint 2010 for High Availability Backups Figure 12-14 On the Back Up Database dialog, verify the database name in the Database list box In large environments, provide a description of the content database in the Description text box The description can include the database name, host web application, etc., to help database administrators easily identify the content database 10 11 In the Backup type list box, select Full from the list of available options For Backup component, click Database Either accept the default backup set name prepopulated in the Name text box or enter a different name for the backup set Choose the type of backup destination by clicking Disk If a filename is not already populated, click Add to add one Figure 12-15 shows the database being backed up to C:\ Backups\WSS_Content.bak SQL Server 2008 Enterprise and later support backup compression By default, whether a backup is compressed depends on the value of the backup-compression default server configuration option However, regardless of the current server-level default, you can compress a backup by checking Compress backup, or you can prevent compression by checking Do not compress backup Disaster Recovery ❘ 331 Figure 12-15 To restore a content database backed up through SQL Server: Open Microsoft SQL Server Management Studio and connect to the appropriate instance of the Microsoft SQL Server Database Engine In Object Explorer, click the server name to expand the server tree In the To database box type the name you want the restored database to have Normally this is the database’s original name with the date of the backup appended Click From device and use the ellipses to choose the database backup file you created in the preceding backup steps In most disaster recovery instances you need to keep the production database online, but you need to recover an older instance to get content out To that you will restore the database with a different name Right click on Databases and select Restore Database… as shown in Figure 12-16 Figure 12-16 332 ❘ chAPtER 12 coNfigUriNg sharePoiNt 2010 for high availaBility BackUPs When the list of backup sets populates be sure to click the checkbox next to the one you want to restore, even if there is only one Figure 12-17 shows how it should look Click OK, and if things go well you will get a happy dialog box telling you the restore completed successfully Congratulations! FIguRE 12-17 If you prefer to restore over the top of an existing database you can that too In step 3, right-click on the database you want to restore over and select Tasks ➪ Restore ➪ Database Then follow the same steps to restore your database Database snapshots SharePoint 2010 also introduces support for database snapshots (to learn more about snapshots, see “SQL Server Snapshots,” earlier in this chapter) Snapshots are a little tough to set up, and defi nitely not for the faint of heart In this section you take a look at how to set them up, then walk through the steps Figure 12-18 shows the before and after Disaster recovery ❘ 333 FIguRE 12-18 The query in the query window is the command that was used to create the snapshot There is no way in the UI to it The fi rst line creates the snapshot as a database named WSS_Content_Snap The arrow points to where you will fi nd it in the interface after it has been created The next line, Name=WSS_Content, refers to the Logical name of the database fi le for the database you are making the snapshot of In most cases it will be the same as the database name itself, as is the case here The next line specifies the name of the file that will contain the snapshot, WSS_Content_Snap.ss The fi nal line specifies which database this will be a snapshot of That’s all there is to it Once you get the query written, press the Execute button in the menu bar, sit back, and let the magic happen Once you have the snapshot created you can treat it like any read-only database You can mount it in SharePoint and render out the content, or you can use it to an unattached database restore When you’re finished with the snapshot you can delete it the same way you would a regular database Backing up content databases to snapshots is only available through the SQL Server management tools When using snapshots, you should understand their limitations and requirements For more information on this subject, see the SQL Server Books Online article at http://technet.microsoft.com/en-us/ library/ms189940.aspx 334 ❘ chAPtER 12 coNfigUriNg sharePoiNt 2010 for high availaBility BackUPs backing up and Restoring Service Applications The new service application architecture not only provides new and compelling scenarios previously not possible under Office SharePoint Server 2007’s SSP design, but also introduces new services, some with databases associated, that must be considered when planning your overall backup and restore strategies Fortunately, SharePoint 2010’s native backup and restore capabilities enable both backup and restore of individual service applications, with their respective content where applicable, and backup and restore of only their unique configuration settings Backing Up and restoring service applications with Windows Powershell To back up a service application using Windows PowerShell, enter the following command in the Microsoft SharePoint 2010 Management Shell: Backup-SPFarm -Directory -BackupMethod {Full | Differential} -Item [-Verbose] To perform a restore, use this command: Restore-SPFarm -Directory -Item -RecoveryMethod Overwrite [ -BackupId ] [-Verbose] To specify which backup to use, use the BackupId parameter You can view the backups for the farm by entering the following cmdlet from the SharePoint Management Shell: Get-SPBackupHistory -Directory -ShowBackup If you not specify the BackupId, the most recent backup will be used You cannot restore a service application from a configuration-only backup Backing Up and restoring service applications with Central administration Follow these steps to back up a service application using Central Administration: From the Central Administration home page, select Backup and Restore ➪ Perform a backup First you will choose which service application you want to back up As with backing up content databases above, you can back up one, or all, but nothing in between Click a service application to back up and click Next Next you can choose a full or differential backup If you’re not sure which you want, or if you haven’t done a full backup yet, select full Enter a UNC path for the backup location and click Start Backup ... to the features provided through SharePoint 2010 Central Administration, SharePoint 2010 continues to provide backup and restore capabilities through both the SharePoint Administration Tool and... current backup job in the lower part of the page in the Backup section To restore a content database using SharePoint 2010 Backup and Restore: Open SharePoint 2010 Central Administration and... backups SharePoint 2010 does not support partitioning schemes, which are required to fully support multiple fi legroups, so these options are not discussed here; however, while SharePoint 2010 supports