Steps to backup and restore a farm using Windows Powershell
A.
Open Sharepoint 2010 Management Shell. Then type the following command, BackupSPConfigurationDatabase -Directory <String> [-AssignmentCollection <SPAssignmentCollection>] [-
DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>] [-Item
<String>]and to restore type, Restore-SPConfigurationDatabase -Directory <String> [-
AssignmentCollection
<SPAssignmentCollection>] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-
DatabaseServer <String>] [-Item <String>]
B.
Open Sharepoint 2010 Management Shell. Then type the following command, Backup-SPFarm –
Directory
<BackupFolder> -BackupMethod {Full | Differential} [-Verbose] and to restore type, Restore-SPFarm
–
Directory <BackupFolder> -RestoreMethod Overwrite [-BackupId <GUID>]
C.
Open Sharepoint 2010 Management Shell. Then type the following command, Backup-SPSite –
Identity <Site collection name> -Path <backup file> [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-
Verbose]and to restore
type,Restore-SPSite -Identity<Site collection URL> -Path<Backup file> [-DatabaseServer<Database
server name>] [-DatabaseName<Content database name>] [-HostHeader<Host header>] [-Force] [-
GradualDelete]
[-Verbose]
D.
Open Sharepoint 2010 Management Shell. Then type the following command, (GetSPBackupHistory –
Directory C:\Backup -ShowBackup)[0].SelfId | Restore-SPFarm -Directory C:\Backup –RestoreMethod
overwrite and to restore type,Get-SPBackupHistory -Directory C:\Backup –RestoreBackup
Explanation:
Resource:
http://technet.microsoft.com/en-us/library/ee428295.aspx#section1
To back up a farm by using Windows PowerShell
On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.