Backup-SPEnterpriseSearchServiceApplicationIndex
Takes a backup of the search index to a specified backup location.
Syntax
Backup-SPEnterpriseSearchServiceApplicationIndex
[-Phase] <Int32>
[-SearchApplication] <SearchServiceApplication>
[-BackupFolder] <String>
[-BackupHandleFile] <String>
[[-Retries] <Int32>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-WhatIf]
[-PeerToPeer]
[-SpecifiedBackupHandle <String>]
[<CommonParameters>]
Backup-SPEnterpriseSearchServiceApplicationIndex
[-SearchApplication] <SearchServiceApplication>
[-BackupHandleFile] <String>
[[-Retries] <Int32>]
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-WhatIf]
[-Abort]
[-PeerToPeer]
[-SpecifiedBackupHandle <String>]
[<CommonParameters>]
Description
This cmdlet will take a backup of the search index to a specified backup location. The cmdlet has to be run in two phases. Phase one will take a backup of what is present in the index at the time that the backup cmdlet is run. Phase two will take a differential backup of what was added to the index after you started the first phase index backup.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.
Examples
------------------EXAMPLE 1------------------
$ssa = Get-SPEnterpriseSearchServiceApplication
Backup-SPEnterpriseSearchServiceApplicationIndex -Phase 1 -SearchApplication $ssa -BackupFolder "\\backuphost\backupfolder" -BackupHandleFile "\\backuphost\backupfolder\backuphandle.txt" -Retries 3
This example starts a Phase 1 backup of the search index for the default search application, and stores the backup at the location \\backuphost\backupfolder. The cmdlet stores a handle file backuphandle.txt that is used by the second phase cmdlet.
------------------EXAMPLE 2------------------
$ssa = Get-SPEnterpriseSearchServiceApplication
Backup-SPEnterpriseSearchServiceApplicationIndex -Phase 1 $ssa -BackupFolder "\\backuphost\backupfolder" -BackupHandleFile "\\backuphost\backupfolder\backuphandle.txt" -Retries 3
This example checks the backup status and progress by re-running the cmdlet for Phase 1.
------------------EXAMPLE 3------------------
$ssa = Get-SPEnterpriseSearchServiceApplication
Backup-SPEnterpriseSearchServiceApplicationIndex -Phase 2 -SearchApplication $ssa -BackupFolder "\\backuphost\backupfolder" -BackupHandleFile "\\backuphost\backupfolder\backuphandle.txt" -Retries 3
This example starts the Phase 2 of the search index backup by using the same backup location and backup handle file as used for Phase 1. The Search Service Application must be paused before the second phase can be started.
Parameters
-Abort
{{Fill Abort Description}}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-BackupFolder
Full UNC path of the backup files should be written.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-BackupHandleFile
Specifies a file handle for an ongoing backup job.
Type: | String |
Position: | 4 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Confirm
Prompts you for confirmation before executing the command.
For more information, type the following command: get-help about_commonparameters
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-PeerToPeer
{{Fill PeerToPeer Description}}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Phase
Specifies the phase of the backup job.
Type: | Int32 |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Retries
Number of times to retry if temporary failure occurs.
Type: | Int32 |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-SearchApplication
Name of the search service application to be backed up
Type: | SearchServiceApplication |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-SpecifiedBackupHandle
{{Fill SpecifiedBackupHandle Description}}
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-WhatIf
Displays a message that describes the effect of the command instead of executing the command.
For more information, type the following command: get-help about_commonparameters
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |