Start-VEPSQLInstancePublish

Short Description

Publishes a backed-up PostgreSQL instance.

Applies to

Veeam Backup & Replication

Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Start-VEPSQLInstancePublish [-Instance] <VEPSQLInstance> [[-ToPointInTimeUTC] <DateTime>] -LinuxCredentials <VEPSQLLinuxCredential> [-ServerName <string>] [-SshPort <int>] [-Force <SwitchParameter>] [-Port <int>] [<CommonParameters>]

Detailed Description

This cmdlet publishes a backed-up PostgreSQL instance.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Instance

Specifies a PostgreSQL instance that the cmdlet will publish.

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

True

0

True (ByValue)

ToPointInTimeUTC

Specifies a point in time in the UTC format within the restore interval of the PostgreSQL instance.

The cmdlet will publish the instance to the state of the specified point in time.

DateTime

False

1

False

LinuxCredentials

Specifies Linux credentials that the cmdlet will use to connect to the Linux machine.

Accepts the VEPSQLLinuxCredentials object. To get this object, run the New-VEPSQLLinuxCredential cmdlet.

True

Named

True (ByValue)

ServerName

Specifies a name of the target PostgreSQL server. The cmdlet will publish a PostgreSQL instance to that server.

String

False

Named

False

SshPort

Specifies the SSH port number. The cmdlet will use this port to connect to the Linux VM.

Default: 22

Int32

False

Named

False

Force

Defines that the cmdlet will replace the target PostgreSQL instance with the instance from the backup.

Note: The cmdlet will show no prompt before executing the command.

SwitchParameter

False

Named

False

Port

Specifies the port to connect to the published PostgreSQL instance.

Int32

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 VEPSQLInstancePublish[] object that contains information about the publishing process for the PostgreSQL instance.

Example

Publishing PostgreSQL Instance

This example shows how to publish backed-up PostgreSQL instance to a machine with PostgreSQL.

$session = Get-VEPSQLRestoreSession

$instance = Get-VEPSQLInstance -Session $session[0]

$securepassword = Read-Host -Prompt "Enter password" -AsSecureString

$linuxcreds = New-VEPSQLLinuxCredential -Account "root" -Password $securepassword

Start-VEPSQLInstancePublish -Instance $instance -LinuxCredentials $linuxcreds

Perform the following steps:

  1. Get the restore session:
  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. Save the result to the $instance variable.
  1. Get Linux credentials:
  1. Run the Read-Host cmdlet. Specify the Prompt parameter value. Provide the AsSecureString parameter. Save the result to the $securepassword variable.
  2. Run the New-VEPSQLLinuxCredential cmdlet. Specify the Account parameter value. Set the $securepassword variable as the Password parameter value.
  1. Run the Start-VEPSQLInstancePublish cmdlet. Specify the following settings:
  • Set the $instance variable as the Instance parameter value.
  • Set the $linuxcreds variable as the LinuxCredentials parameter value.

Related Commands

Page updated 4/19/2024

Page content applies to build 12.2.0.334