Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Powershell

StartPIBackup Class

  • Last UpdatedDec 15, 2025
  • 4 minute read
StartPIBackup Class

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

SystemObject
  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

  NameDescription
Public method
StartPIBackup

Properties

  NameDescription
Public property
ArchiveIndex

Indices of historical archives to include in the PI Backup. Index = 0 is the primary archive.

Public property
BackupLocation

Backup location for the PI Backup

Public property
Connection

Connection to a PI Data Archive from which to retrieve archive statistics

(Overrides OSICmdletBaseWithConnectionConnection.)
Public property
CutoffDate

Do not include historical archives older than the CutoffDate

Public property
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"

Public property
ExcludeFuture

Exclude future archives from the PI Backup

Public property
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"

Public property
NumberOfArchives

Number of most recent historical archives to include in the PI Backup

Public property
Type

Type of PI Backup to perform

Examples

Start-PIBackup -BackupLocation E:\PIBackup -NumberOfArchives 3 -Type Incremental -Connection $con

Where:

$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.

See Also

TitleResults for “How to create a CRG?”Also Available in