Skip to content

Latest commit

 

History

History
287 lines (209 loc) · 7.61 KB

File metadata and controls

287 lines (209 loc) · 7.61 KB
external help file Microsoft.Office.Server.Search.dll-help.xml
Module Name SharePointServer
online version https://learn.microsoft.com/powershell/module/sharepoint-server/backup-spenterprisesearchserviceapplicationindex
applicable SharePoint Server Subscription Edition
title Backup-SPEnterpriseSearchServiceApplicationIndex
schema 2.0.0

Backup-SPEnterpriseSearchServiceApplicationIndex

SYNOPSIS

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

-Phase

Applicable: SharePoint Server Subscription Edition

Specifies the phase of the backup job.

Type: Int32
Parameter Sets: RunBackup
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication

Applicable: SharePoint Server Subscription Edition

Name of the search service application to be backed up

Type: SearchServiceApplication
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackupFolder

Applicable: SharePoint Server Subscription Edition

Full UNC path of the backup files should be written.

Type: String
Parameter Sets: RunBackup
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackupHandleFile

Applicable: SharePoint Server Subscription Edition

Specifies a file handle for an ongoing backup job.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Retries

Applicable: SharePoint Server Subscription Edition

Number of times to retry if temporary failure occurs.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection

Applicable: SharePoint Server Subscription Edition

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
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm

Applicable: SharePoint Server Subscription Edition

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Applicable: SharePoint Server Subscription Edition

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
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Abort

Applicable: SharePoint Server Subscription Edition

{{Fill Abort Description}}

Type: SwitchParameter
Parameter Sets: AbortBackup
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerToPeer

Applicable: SharePoint Server Subscription Edition

{{Fill PeerToPeer Description}}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SpecifiedBackupHandle

Applicable: SharePoint Server Subscription Edition

{{Fill SpecifiedBackupHandle Description}}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

RELATED LINKS