Start-VEPSQLInstanceRestore

Short Description

Restores a backed-up PostgreSQL instance.

Applies to

Veeam Backup & Replication

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Start-VEPSQLInstanceRestore [-Instance] <VEPSQLInstance> [[-ToPointInTimeUTC] <DateTime>] [-LinuxCredentials <VEPSQLLinuxCredential>] [-ServerName <String>] [-DataDirectory <String>] [-PostRestoreAction <VEPSQLPostRestoreAction>] [-SshPort <Int32>] [-Force] [-TablespacePath <String[]>] [-Tablespace <VEPSQLTableSpace[]>] [-Port <Int32>] [<CommonParameters>]

Detailed Description

This cmdlet restores a backed-up PostgreSQL instance.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Instance

Specifies a PostgreSQL instance that the cmdlet will restore.

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

True

0

True (ByValue)

ToPointInTimeUTC

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

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

If you do not use this parameter, the cmdlet will restore the instance to the point in time when the restore point for which you started the restore session was created.

DateTime

False

1

False

LinuxCredentials

Specifies Linux credentials. The cmdlet will use these credentials to connect to the target PostgreSQL server.

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

False

Named

True (ByValue)

ServerName

Specifies DNS name or IP address of the target PostgreSQL server. The cmdlet will restore a PostgreSQL instance to that server.

String

False

Named

False

DataDirectory

Specifies a path to the data directory for the restored PostgreSQL instance. The cmdlet will restore the specified instance to the specified data directory.

String

False

Named

False

PostRestoreAction

Specifies the action with the restored PostgreSQL instance.

  • Promote — use this option to start the instance after restore. The instance will operate in a regular way as a production instance.
  • Pause — use this option to start the instance after restore. The instance will operate but will not accept incoming TCP connections. This option is useful, for example, if you want to verify the state of the PostgreSQL database after restore.
  • Shutdown — use this option to restore the instance without starting the instance after the restore process is completed.

Default: Promote

VEPSQLPostRestoreAction

False

Named

False

SshPort

Specifies the SSH port number. The cmdlet will use that port to connect to the target PostgreSQL server.

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

TablespacePath

Specifies an array of tablespace paths for the restored PostgreSQL instance. The cmdlet will restore PostgreSQL tablespaces to locations specified in this array.

Note: This parameter must be used together with the Tablespace parameter.

String[]

False

Named

False

Tablespace

Specifies an array of tablespace names for the restored PostgreSQL instance. The cmdlet will restore tablespaces specified in this array.

Note:

  • For every PostgreSQL tablespace, you must assign a specific tablespace path.
  • This parameter must be used together with the TablespacePath parameter.

Accepts the VEPSQLTableSpace[] object. To get this object, run the Get-VEPSQLTablespace cmdlet.

False

Named

False

Port

Specifies the port to connect to the restored 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 VEPSQLInstanceRestore object that contains information about the restore process for the PostgreSQL instance.

Examples

Start-VEPSQLInstanceRestoreExample 1. Restoring PostgreSQL Instance to Original Server

Start-VEPSQLInstanceRestoreExample 2. Restoring PostgreSQL Instance to Another Server

Related Commands

Page updated 4/8/2025

Page content applies to build 12.3.1.1139