Share via


Backup-SPEnterpriseSearchServiceApplicationIndex

Takes a backup of the search index to a specified backup location.

Syntax

RunBackup

Backup-SPEnterpriseSearchServiceApplicationIndex
    [-Phase] <Int32>
    [-SearchApplication] <SearchServiceApplication>
    [-BackupFolder] <String>
    [-BackupHandleFile] <String>
    [[-Retries] <Int32>]
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Confirm]
    [-WhatIf]
    [-PeerToPeer]
    [-SpecifiedBackupHandle <String>]
    [<CommonParameters>]

AbortBackup

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

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

{{Fill Abort Description}}

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AbortBackup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AssignmentCollection

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-BackupFolder

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Full UNC path of the backup files should be written.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RunBackup
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BackupHandleFile

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies a file handle for an ongoing backup job.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PeerToPeer

Applicable: SharePoint Server 2016, SharePoint Server 2019

{{Fill PeerToPeer Description}}

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Phase

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the phase of the backup job.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RunBackup
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Retries

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Number of times to retry if temporary failure occurs.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:5
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SearchApplication

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Name of the search service application to be backed up

Parameter properties

Type:SearchServiceApplication
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SpecifiedBackupHandle

Applicable: SharePoint Server 2016, SharePoint Server 2019

{{Fill SpecifiedBackupHandle Description}}

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.