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 <SwitchParameter>] [-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 a name 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.
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:
| 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
Example 1. Restoring PostgreSQL Instance to Original Server
This example shows how to restore a backed-up PostgreSQL instance to a target PostgreSQL server. The restore operation will start with the following settings:
Perform the following steps:
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.
|
Example 2. Restoring PostgreSQL Instance to Another Server
This example shows how to restore a backed-up PostgreSQL instance to a target PostgreSQL server. The restore operation will start with the following settings:
Perform the following steps:
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.
|
Related Commands