Start-VESQLPublishedDatabaseExport
Short Description
Exports a published Microsoft SQL Server database.
Applies to
Veeam Backup & Replication
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides parameter sets that allow you to:
- Export a published database using explicitly provided credentials.
|
Start-VESQLPublishedDatabaseExport [-PublishedDatabase] <VESQLDatabasePublish> [-Path] <String> [-EnableCompression] [-Force] [-TargetHost <String>] -TargetGuestCredentials <PSCredential> [<CommonParameters>] |
- Export a published database using a Group Managed Service Account (gMSA) for authentication.
|
Start-VESQLPublishedDatabaseExport [-PublishedDatabase] <VESQLDatabasePublish> [-Path] <String> [-EnableCompression] [-Force] [-TargetHost <String>] [-TargetGuestCredentials <PSCredential>] -GMSAAccount <String> [<CommonParameters>] |
Detailed Description
This cmdlet exports a published Microsoft SQL Server database to the specified destination on the machine where the PowerShell session is running.
|
Note |
|
The published database can only be exported as a .bak file. |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
PublishedDatabase |
Specifies a publishing session for the Microsoft SQL Server database that you want to export. |
Accepts the VESQLDatabasePublish object. To get this object, run the Get-VESQLDatabasePublish cmdlet. |
True |
0 |
True (ByValue) |
|
Path |
Specifies a full file path. The cmdlet will export the published Microsoft SQL Server database to that file path. |
String |
True |
1 |
False |
|
EnableCompression |
Defines that the cmdlet will compress the backup file. Note: This option is available only if your version of Microsoft SQL Server supports the compression option. |
SwitchParameter |
False |
Named |
False |
|
Force |
Defines that if there is a .bak file with the same name on the target location, the cmdlet will overwrite it. Note: The cmdlet will show no prompt before executing the command. |
SwitchParameter |
False |
Named |
False |
|
GMSAAccount |
Specifies the name of the Group Managed Service Account (gMSA). The cmdlet will use this account to authenticate to Microsoft SQL Server on the target machine. |
String |
True |
Named |
False |
|
TargetHost |
Specifies the name of the target Windows server. |
String |
False |
Named |
False |
|
TargetGuestCredentials |
Specifies credentials to authenticate to the target Windows server. |
Accepts the PSCredential object. To get this object, run the Get-Credential cmdlet. |
True |
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 VESQLDatabaseExport object that contains information about the specified export job.
Examples
Example 1. Exporting Published Database
|
This example shows how to export a published Microsoft SQL Server database to a file on a target Windows server.
Perform the following steps:
The cmdlet will return an array of publishing sessions. Note the ordinal number of the necessary publishing session. In this example, it is the first publishing session in the array.
Save the result to the $export variable to be able to use it with other cmdlets. |
Example 2. Exporting Published Database to Remote Server with Compression
|
This example shows how to export a published Microsoft SQL Server database to a remote Windows server. The export job will run with the following settings:
Perform the following steps:
The cmdlet will return an array of publishing sessions. Note the ordinal number of the necessary publishing session. In this example, it is the first publishing session in the array.
Save the result to the $export variable to be able to use it with other cmdlets. |
Related Commands