StartPIBackup Class
- Last UpdatedDec 15, 2025
- 4 minute read
Initiate a PI Backup on a PI Data Archive
The Start-PIBackup cmdlet initiates a PI Backup on a PI Data Archive
The connection parameter specifies which connection to a PI Data Archive to use.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellOSICmdletBaseWithConnection
OSIsoft.PowerShellStartPIBackup
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Start", "PIBackup", DefaultParameterSetName = "Archives", SupportsShouldProcess = true)] public class StartPIBackup : OSICmdletBaseWithConnection
<CmdletAttribute("Start", "PIBackup", DefaultParameterSetName := "Archives", SupportsShouldProcess := true)> Public Class StartPIBackup Inherits OSICmdletBaseWithConnection Dim instance As StartPIBackup
[CmdletAttribute(L"Start", L"PIBackup", DefaultParameterSetName = L"Archives", SupportsShouldProcess = true)] public ref class StartPIBackup : public OSICmdletBaseWithConnection
[<CmdletAttribute("Start", "PIBackup", DefaultParameterSetName = "Archives", SupportsShouldProcess = true)>] type StartPIBackup = class inherit OSICmdletBaseWithConnection end
The StartPIBackup type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| StartPIBackup |
Properties
| Name | Description | |
|---|---|---|
| ArchiveIndex | Indices of historical archives to include in the PI Backup. Index = 0 is the primary archive. | |
| BackupLocation | Backup location for the PI Backup | |
| Connection | Connection to a PI Data Archive from which to retrieve archive statistics | |
| CutoffDate | Do not include historical archives older than the CutoffDate | |
| Exclude | Components to exclude from the PI Backup To get a list of possible components to exclude, see example 2 of Get-PIBackupIdentifyReport using "Get-Help Get-PIBackupIdentifyReport -Examples" | |
| ExcludeFuture | Exclude future archives from the PI Backup | |
| Include | Components to include in the PI Backup. If none are specified explicitly, all will be backed up. To get a list of possible components to include, see example 2 of Get-PIBackupIdentifyReport using "Get-Help Get-PIBackupIdentifyReport -Examples" | |
| NumberOfArchives | Number of most recent historical archives to include in the PI Backup | |
| Type | Type of PI Backup to perform |
Examples
Start-PIBackup -BackupLocation E:\PIBackup -NumberOfArchives 3 -Type Incremental -Connection $conWhere:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
This example initiates an incremental backup of the "PISRV1" PI Data Archive. The backup will be written to E:\PIBackup and will include 3 historical archives, in addition to any files that have changed since the last backup. (incremental)
Examples
Start-PIBackup -BackupLocation E:\PIBackup -Type Copy -ArchiveIndex 0,12,13,14 -ExcludeFuture -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
This example initiates a copy backup of the "PISRV1" PI Data Archive. The backup will be written to E:\PIBackup and will include 4 historical archives, specifically those with index 0 (primary archive), 12, 13 and 14. No future archives will be backed up.