Invoke-SqlBackup

Performs a SQL database or log backup.

Syntax

Invoke-SqlBackup [-sqlserver] <Object> [-dbname] <String> [-filepath] <String> [[-action] {Database | Files | Log}] [[-description] <String>] [[-name] <String>] [[-force]] [[-incremental]] [[-copyOnly]] [<CommonParameters>]

Detailed Description

The Invoke-SqlBackup function performs a SQL database or log backup of the specified database.

Related Commands

* Invoke-SqlBackup

Parameters

Name Description Required? Pipeline Input Default Value
sqlserver    true  false   
dbname    true  false   
filepath    true  false   
action    false  false   
description    false  false   
name    false  false   
force    false  false   
incremental    false  false   
copyOnly    false  false   

Input Type

None You cannot pipe objects to Invoke-SqlBackup

Return Values

None This function does not generate any output.

Examples

EXAMPLE 1

Invoke-SqlBackup "Z002\sql2k8" "pubs"  "C:\sqlrec\pubs.bak"
This command backs up the pubs database to disk.