Backup Backup Backup Class

Definition

public sealed class Backup : Microsoft.SqlServer.Management.Smo.BackupRestoreBase
type Backup = class
    inherit BackupRestoreBase
Public NotInheritable Class Backup
Inherits BackupRestoreBase
Inheritance

Constructors

Backup() Backup() Backup()

Properties

Action Action Action
AsyncStatus AsyncStatus AsyncStatus

A status of most recent asynchronous operation, including possible errors.

(Inherited from BackupRestoreBase)
BackupSetDescription BackupSetDescription BackupSetDescription
BackupSetName BackupSetName BackupSetName
BlockSize BlockSize BlockSize Inherited from BackupRestoreBase
BufferCount BufferCount BufferCount Inherited from BackupRestoreBase
Checksum Checksum Checksum Inherited from BackupRestoreBase
CompressionOption CompressionOption CompressionOption

The CompressionOption property specifies backup compression option

ContinueAfterError ContinueAfterError ContinueAfterError Inherited from BackupRestoreBase
CopyOnly CopyOnly CopyOnly
CredentialName CredentialName CredentialName

Gets or sets the credential name that is used by Backup to Url

(Inherited from BackupRestoreBase)
Database Database Database Inherited from BackupRestoreBase
DatabaseFileGroups DatabaseFileGroups DatabaseFileGroups Inherited from BackupRestoreBase
DatabaseFiles DatabaseFiles DatabaseFiles Inherited from BackupRestoreBase
Devices Devices Devices

A list of devices used as a target for backup

(Inherited from BackupRestoreBase)
EncryptionOption EncryptionOption EncryptionOption

The EncryptionOption property specifies backup encryption option.

ExpirationDate ExpirationDate ExpirationDate
FormatMedia FormatMedia FormatMedia
Incremental Incremental Incremental
Initialize Initialize Initialize
LogTruncation LogTruncation LogTruncation
MaxTransferSize MaxTransferSize MaxTransferSize Inherited from BackupRestoreBase
MediaDescription MediaDescription MediaDescription
MediaName MediaName MediaName Inherited from BackupRestoreBase
Mirrors Mirrors Mirrors

Mirrors

NoRecovery NoRecovery NoRecovery Inherited from BackupRestoreBase
NoRewind NoRewind NoRewind Inherited from BackupRestoreBase
PercentCompleteNotification PercentCompleteNotification PercentCompleteNotification Inherited from BackupRestoreBase
Restart Restart Restart Inherited from BackupRestoreBase
RetainDays RetainDays RetainDays
RetryFailedQueries RetryFailedQueries RetryFailedQueries Inherited from BackupRestoreBase
SkipTapeHeader SkipTapeHeader SkipTapeHeader
UndoFileName UndoFileName UndoFileName
UnloadTapeAfter UnloadTapeAfter UnloadTapeAfter Inherited from BackupRestoreBase

Methods

Abort() Abort() Abort()

Aborts the current action, if any

(Inherited from BackupRestoreBase)
CheckForHADRMaintPlan(Server, StringBuilder) CheckForHADRMaintPlan(Server, StringBuilder) CheckForHADRMaintPlan(Server, StringBuilder)

If invoked from Maintenance plan Check if HADR is enabled

(Inherited from BackupRestoreBase)
ExecuteSql(Server, StringCollection) ExecuteSql(Server, StringCollection) ExecuteSql(Server, StringCollection) Inherited from BackupRestoreBase
ExecuteSqlAsync(Server, StringCollection) ExecuteSqlAsync(Server, StringCollection) ExecuteSqlAsync(Server, StringCollection) Inherited from BackupRestoreBase
ExecuteSqlWithResults(Server, String) ExecuteSqlWithResults(Server, String) ExecuteSqlWithResults(Server, String) Inherited from BackupRestoreBase
GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) Inherited from BackupRestoreBase
IsStringValid(String) IsStringValid(String) IsStringValid(String) Inherited from BackupRestoreBase
Script(Server) Script(Server) Script(Server)

Generates script for the current backup operation

SetMediaPassword(SecureString) SetMediaPassword(SecureString) SetMediaPassword(SecureString) Inherited from BackupRestoreBase
SetMediaPassword(String) SetMediaPassword(String) SetMediaPassword(String) Inherited from BackupRestoreBase
SetPassword(SecureString) SetPassword(SecureString) SetPassword(SecureString) Inherited from BackupRestoreBase
SetPassword(String) SetPassword(String) SetPassword(String) Inherited from BackupRestoreBase
SqlBackup(Server) SqlBackup(Server) SqlBackup(Server)

Runs backup operation synchronously, i.e. the function call blocks untill the backup is done.

SqlBackupAsync(Server) SqlBackupAsync(Server) SqlBackupAsync(Server)

Runs backup operation asynchronously, i.e. the call returns immediately, and the backup operation runs in the background

Wait() Wait() Wait()

Waits for the current asynchronous action to complete.

(Inherited from BackupRestoreBase)

Events

Complete Complete Complete

Complete event

(Inherited from BackupRestoreBase)
Information Information Information

Information event

(Inherited from BackupRestoreBase)
NextMedia NextMedia NextMedia

NextMedia event

(Inherited from BackupRestoreBase)
PercentComplete PercentComplete PercentComplete

PercentComplete event

(Inherited from BackupRestoreBase)

Fields

currentAsyncOperation currentAsyncOperation currentAsyncOperation Inherited from BackupRestoreBase
m_BackupAction m_BackupAction m_BackupAction Inherited from BackupRestoreBase
m_LogTruncation m_LogTruncation m_LogTruncation Inherited from BackupRestoreBase
m_RestoreAction m_RestoreAction m_RestoreAction Inherited from BackupRestoreBase

Applies to