Sometimes our SharePoint Database gets corrupted & we cannot access our database. To back up SharePoint, it is very important to understand that each SharePoint portal contains one or more Web servers, application servers, query servers, index servers, application servers, all storing content inside a SQL Server database server. These parts of a SharePoint can be loaded onto a single server, or distributed across several servers in a server farm. Backing up SharePoint on a single server is relatively straightforward; to back up a farm.
SharePoint 2010 provides three types of inbuilt tools for backup & restore for your server farm. The tools are: Central Administration, Windows PowerShell, Stsadm.exe
As I have already discussed about Central Administration, Stsadm command in my earlier post. Today I am going to share about Windows PowerShell tool. The preferred way to take backups in SharePoint Server 2010 is by using windows PowerShell & can also schedule the backup using Windows PowerShell.
Backup a Server Farm:
To back up a server farm by using Windows PowerShell. Use Backup-SPFarm command:
Backup-SPFarm -directory <UNC File Share> -BackupMethod <Full | Differential>
Restore a Server Farm:
The backups taken by PowerShell can be restored by Central Administration or by using the PowerShell Script. Use Restore-SPFarm commandlet.
The UNC share where you configured your backup, have more than one backup. So to restore by PowerShell command, first you should specify the backup ID for the backup to restore. This process is followed by this command:
Get-SPBackupHistory -Directory <Backup folder> -ShowBackup [-Verbose]
See the output on command prompt:
Now restore farm with Restore-SPFarm command as follows
Restore-SPFarm -Directory UNCShare -BackupId <id of backup>
SharePoint provides lot of inbuilt utilities for backup/ restore, from a full farm level to list level. For any server farm, Planning for backup & restore is very important part and you need to carefully decide “which backup & restore strategy you should choose. These strategies works when you have your updated SharePoint backup, also won't work in some corruption cases due to severe corruption. There is no need to SharePoint Admin to spend countless hours to rebuild your entire production database, or worry about deploying a temporary SharePoint recovery farm, in this case, you should use Third party SharePoint Recovery tools. Stellar Phoenix for SharePoint dramatically simplifies the process of restoring individual documents, articles, wikis, sites, sub-sites and folders. This software works in almost every SharePoint corruption scenarios.