Get-VEPSQLInstance

Short Description

Returns backed-up PostgreSQL instances.

Applies to

Veeam Backup & Replication

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Get-VEPSQLInstance [-Session] <VEPSQLRestoreSession> [-DataDirectory <string>] [<CommonParameters>]

Detailed Description

This cmdlet returns an array of backed-up PostgreSQL instances.

After you get backed-up PostgreSQL instances, you can perform the following operations with these instances:

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Session

Specifies an active restore session. The cmdlet will return an array of PostgreSQL instances within the specified restore session.

Accepts the VEPSQLRestoreSession object. To get this object, run the Get-VEPSQLRestoreSession cmdlet.

True

0

True (ByValue)

DataDirectory

Specifies a path to the data directory of the backed-up PostgreSQL instance. The cmdlet will return the PostgreSQL instance with the specified data directory.

String

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Output Object

The cmdlet returns the VEPSQLInstance[] object that contains an array of backed-up PostgreSQL instances.

Examples

Get-VEPSQLInstanceExample 1. Getting PostgreSQL Instances Within Specified Restore Session

This example shows how to get all PostgreSQL instances included in a PostgreSQL restore session.

$session = Get-VEPSQLRestoreSession

Get-VEPSQLInstance -Session $session[0]

Perform the following steps:

  1. Run the Get-VEPSQLRestoreSession cmdlet. Save the result to the $session variable.

The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.

  1. Run the Get-VEPSQLInstance cmdlet. Set the $session variable as the Session parameter value.

Get-VEPSQLInstanceExample 2. Getting PostgreSQL Instance With Specified Data Directory

This example shows how to get a specific PostgreSQL instance included in a PostgreSQL restore session.

$session = Get-VEPSQLRestoreSession

Get-VEPSQLInstance -Session $session[0] -DataDirectory /var/lib/pgsql/13/data

Perform the following steps:

  1. Run the Get-VEPSQLRestoreSession cmdlet. Save the result to the $session variable.

The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.

  1. Run the Get-VEPSQLInstance cmdlet. Set the $session variable as the Session parameter value. Specify the DataDirectory parameter value.

Related Commands

Get-VEPSQLRestoreSession

Page updated 4/23/2024

Page content applies to build 12.1.2.172