Start-VEPSQLDatabaseRestore
Short Description
Restores a backed-up PostgreSQL database.
Applies to
Veeam Backup & Replication
Product Edition: Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Start-VEPSQLDatabaseRestore [-Database] <VEPSQLDatabase> [[-DatabaseName] <String>] [[-ToPointInTimeUTC] <DateTime>] [-LinuxCredentials <VEPSQLLinuxCredential>] [-ServerName <String>] [-SshPort <Int32>] -PostgreSqlCredentials <VEPSQLInstanceCredentials> [-TargetPort <Int32>] [-Force] [<CommonParameters>] |
Detailed Description
This cmdlet restores a backed-up PostgreSQL database to a Linux-based server.
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
Database |
Specifies a PostgreSQL database that you want to restore. Note that this parameter accepts a single database only. |
Accepts the VEPSQLDatabase object. To get this object, run the Get-VEPSQLDatabase cmdlet. |
True |
0 |
True (ByValue) |
|
DatabaseName |
Specifies a name for the restored PostgreSQL database on the target location. The database will be restored with the specified name. |
String |
False |
1 |
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 database to the state of the specified point in time. If you do not use this parameter, the cmdlet will restore the database to the point in time when the restore point for which you started the restore session was created. |
DateTime |
False |
2 |
True (ByValue) |
|
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) |
|
PostgreSqlCredentials |
Specifies PostgreSQL role credentials for authenticating to PostgreSQL on the target machine. |
Accepts the VEPSQLInstanceCredentials object. To get this object, run the New-VEPSQLInstanceCredentials cmdlet. |
True |
Named |
True (ByValue) |
|
ServerName |
For restore to another server. Specifies DNS name or IP address of the target PostgreSQL server. The cmdlet will restore a PostgreSQL database 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 |
|
TargetPort |
Specifies the port to connect to the target PostgreSQL instance. |
Int32 |
False |
Named |
False |
|
Force |
Defines that the cmdlet will replace the target PostgreSQL database with the database from the backup. Note: The cmdlet will show no prompt before executing the command. |
SwitchParameter |
False |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.
Output Object
The cmdlet returns the VEPSQLDatabaseRestore object that contains information about the restore process for the PostgreSQL database.
Examples
Example 1. Restoring PostgreSQL Database to Latest State
|
This example shows how to restore a backed-up PostgreSQL database to its latest state on the selected restore point. 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 this example, it is the first restore session in the array.
|
Example 2. Restoring PostgreSQL Database to Point-in-Time State
|
This example shows how to restore a backed-up PostgreSQL database to a point-in-time state on the selected restore point. 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 this example, it is the first restore session in the array.
Save the result to the $restore variable to be able to use it with other cmdlets. |
Related Commands