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

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

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 filepath. The cmdlet will export published a Microsoft SQL database to that filepath.

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.

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.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Return Type

Example

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

  1. Run the Get-VESQLRestoreSession object to get a restore session for a Microsoft SQL database. Save the result to the $session variable.
  2. Run the Get-VESQLPublishedDatabase object with the $session variable and the Name parameter to specify the Microsoft SQL published database that you want to export. Save the result to the $database variable.
  3. Run the Export-VESQLPublishedDatabase object with the $database variable.

$session = Get-VESQLRestoreSession

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

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

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

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation