--- title: "Start-VEPSQLInstancePublish" description: "Publishes a backed-up PostgreSQL instance. Product: Veeam Backup & Replication Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License This cmdlet provides the following parameter sets: This cmdlet publishes a b" canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/start-vepsqlinstancepublish.html" breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for PostgreSQL > Start-VEPSQLInstancePublish" dateModified: "2026-08-18" --- # Start-VEPSQLInstancePublish ## Short Description Publishes a backed-up PostgreSQL instance. **Product**: Veeam Backup & Replication **Product Edition**: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax This cmdlet provides the following parameter sets: ## Detailed Description This cmdlet publishes a backed-up PostgreSQL instance. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

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

Instance

Specifies a PostgreSQL instance that the cmdlet will publish.

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

VEPSQLInstance

True

0

True (ByValue)

LinuxCredentials

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

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

VEPSQLLinuxCredential

False

Named

True (ByValue)

Port

Specifies the port to connect to the published PostgreSQL instance.

Int32

False

Named

False

ServerName

Specifies DNS name or IP address 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 machine.

Default: 22

Int32

False

Named

False

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

WindowsCredentials

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

Accepts the PSCredential object. To get this object, run the[`Get-Credential`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.6) cmdlet.

PSCredential

False

Named

True (ByValue)

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Docs. ## Output Object The cmdlet returns the [`VEPSQLInstancePublish`](vepsqlinstancepublish.md)`[]` array that contains information about the publishing process for the PostgreSQL instance. ## Examples ::: example ### Example 1. Publishing PostgreSQL Instance to Linux Machine This example shows how to publish a backed-up PostgreSQL instance to a Linux 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`](get-vepsqlrestoresession.md) 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 this example, it is the first restore session in the array. 2. Run the [`Get-VEPSQLInstance`](get-vepsqlinstance.md) cmdlet. Set the `$session` variable as the `Session` parameter value. Save the result to the `$instance` variable. 2. Get Linux credentials: 1. Run the [`Read-Host`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.6) cmdlet. Specify the `Prompt` parameter value. Provide the `AsSecureString` parameter. Save the result to the `$securepassword` variable. 2. Run the [`New-VEPSQLLinuxCredential`](new-vepsqllinuxcredential.md) cmdlet. Specify the `Account` parameter value. Set the `$securepassword` variable as the `Password` parameter value. 3. 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. ::: ::: example ### Example 2. Publishing PostgreSQL Instance to Windows Machine This example shows how to publish a backed-up PostgreSQL instance to a Windows machine with PostgreSQL. ``` $session = Get-VEPSQLRestoreSession $instance = Get-VEPSQLInstance -Session $session[0] $windowscreds = Get-Credential Start-VEPSQLInstancePublish -Instance $instance -WindowsCredentials $windowscreds ``` Perform the following steps: 1. Get the restore session: 1. Run the [`Get-VEPSQLRestoreSession`](get-vepsqlrestoresession.md) 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 this example, it is the first restore session in the array. 2. Run the [`Get-VEPSQLInstance`](get-vepsqlinstance.md) cmdlet. Set the `$session` variable as the `Session` parameter value. Save the result to the `$instance` variable. 2. Run the [`Get-Credential`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.6) cmdlet to create a credential object. Enter credentials that will be used for authenticating to the target PostgreSQL machine. Save the result to the `$credential` variable. 3. Run the `Start-VEPSQLInstancePublish` cmdlet. Specify the following settings: - Set the `$instance` variable as the `Instance` parameter value. - Set the `$windowscreds` variable as the `WindowsCredentials` parameter value. ::: ## Related Commands - [`Get-VEPSQLRestoreSession`](get-vepsqlrestoresession.md) - [`Get-VEPSQLInstance`](get-vepsqlinstance.md) - [``Read-Host``](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.6) - [`New-VEPSQLLinuxCredential`](new-vepsqllinuxcredential.md) - [``Get-Credential``](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.6)