Start-VEPSQLInstanceInstantRecovery
Short Description
Performs instant recovery of a backed-up PostgreSQL instance.
Applies to
Veeam Backup & Replication
Product Edition: Enterprise, Enterprise Plus, Veeam Universal License
Syntax
Start-VEPSQLInstanceInstantRecovery [-Instance] <VEPSQLInstance> [[-ToPointInTimeUTC] <DateTime>] [-LinuxCredentials <VEPSQLLinuxCredential>] [-ServerName <String>] [-DataDirectory <String>] [-SshPort <Int32>] [-Force <SwitchParameter>] [-TablespacePath <String[]>] [-Tablespace <VEPSQLTableSpace[]>] [-Port <Int32>] -SwitchOverOptions <VEPSQLIRSwitchOverOptions> [<CommonParameters>] |
Detailed Description
This cmdlet performs instant recovery of a backed-up PostgreSQL instance. You can restore instances to the original location or to another location. For details, see the Instant Recovery section of the Veeam Explorers User Guide.
Parameters
Parameter | Description | Type | Required | Position | Accept Pipeline Input |
---|---|---|---|---|---|
Instance | Specifies a PostgreSQL instance. The cmdlet will start an instant recovery session for this instance. | Accepts the VEPSQLInstance type. 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. Note: If you do not use this parameter, the cmdlet will restore the instance to the time of the restore point used to start the restore session. | DateTime | False | 1 | False |
DataDirectory | Specifies a path to the data directory for the recovered PostgreSQL instance. The cmdlet will restore the specified instance to the specified data directory. | String | 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 |
LinuxCredentials | Specifies Linux credentials. The cmdlet will use these credentials to connect to the target PostgreSQL server. | Accepts the VEPSQLLinuxCredential type. To get this object, run the New-VEPSQLLinuxCredential cmdlet. | False | Named | True (ByValue) |
Port | Specifies a port for the published PostgreSQL instance. Note: The specified port must be free, otherwise the instance cannot be published to the target server. | Int32 | False | Named | False |
ServerName | Specifies the name of the target server to which the instance will be published. | String | False | Named | False |
SshPort | Specifies the SSH port number. The cmdlet will use that port to connect to the Linux machine. | Int32 | False | Named | False |
SwitchOverOptions | Specifies a switchover option: Auto, Manual or Scheduled. | Accepts the VEPSQLIRSwitchOverOptions type. To get this object, run the New-VEPSQLIRSwitchOverOptions cmdlet. | True | Named | True (ByValue) |
Tablespace | Specifies an array of tablespace names for the recovered PostgreSQL instance. The cmdlet will restore tablespaces specified in this array. Consider the following:
| Accepts the VEPSQLTableSpace[] type. To get this object, run the Get-VEPSQLTablespace cmdlet. | False | Named | False |
TablespacePath | Specifies an array of tablespace paths for the recovered 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 |
<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 VEPSQLInstanceInstantRecovery object that contains information about the PostgreSQL instance published within the instant recovery session.
Examples
Example 1. Performing Instant Recovery of PostgreSQL Instance to Original Location with Scheduled Switchover
This example shows how to perform instant recovery of an instance to the original location using the scheduled switchover option. The cmdlet will perform switchover at 13:00:00 on 2023-11-24 in the timezone of the backup server. The cmdlet will recover the instance to its latest state on the backup file.
Perform the following steps:
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
|
Example 2. Performing Instant Recovery of PostgreSQL Instance to Another Server and Switching Over Manually
This example shows how to perform instant recovery of an instance to another server using the manual switchover option. With this switchover option, you can perform manual switchover with the Switch-VEPSQLInstanceInstantRecovery cmdlet. The cmdlet will recover the instance to a point in time state on the backup file.
Perform the following steps:
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
Save the result to the $irinstance variable to use it with other cmdlets. |
Related Commands