Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
Veeam Explorers PowerShell Reference

Export-VESQLPublishedDatabase

Short Description

Exports published Microsoft SQL databases.

Applies to Veeam Backup & Replication

Product Edition: Community, Standard, Enterprise, Enterprise Plus

Syntax

Export-VESQLPublishedDatabase [-Database] <VESQLPublishedDatabase> [-Path] <string> [-EnableCompression] [-Force][<CommonParameters>]

Detailed Description

This cmdlet exports published Microsoft SQL databases to the specified destination.

Export-VESQLPublishedDatabase Note:

The databases are exported to .bak files only.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

Database

Specifies a published Microsoft SQL database that you want to export.

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

True

0

True (ByValue)

False

Path

Specifies a full file path. The cmdlet will export published a Microsoft SQL database to that file path.

String

True

1

False

False

EnableCompression

For the ToBackupFile parameter.

Indicates that the cmdlet will compress the backup file.

NOTE: This option is available only if your version of the Microsoft SQL server supports the compression option.

SwitchParameter

False

Named

False

False

Force

Indicates that the cmdlet will overwrite the existing Microsoft SQL database files.

NOTE: The cmdlet will show no prompt before executing the command.

SwitchParameter

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Examples

Exporting Published Microsoft SQL Database

This example shows how to export a published Microsoft SQL database.

$session = Get-VESQLRestoreSession

$database = Get-VESQLPublishedDatabase -Session $session[0] -Name "SQLDatabase"

Export-VESQLPublishedDatabase -Database $database -Path "C:\NewPath\File.bak"

You must perform the following steps:

  1. Run the Get-VESQLRestoreSession cmdlet. Save the result to the $session variable.

The Get-VESQLRestoreSession cmdlet will return an array of restore sessions. Mind the ordinal number of the necessary restore session (in our example, it is the first restore session in the array).

  1. Run the Get-VESQLPublishedDatabase cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
  2. Run the Export-VESQLPublishedDatabase cmdlet. Set the $database as the Database parameter value. Specify the Path parameter value.

Related Commands

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions Reference

Veeam Availability for Nutanix AHV Documentation

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation