The Backup-CVSQLDatabase cmdlet submits a backup job for a specific SQL database.
Before you can use this cmdlet, you must log on to your CommCell environment using the Connect-CVServer cmdlet. For more information, see Connecting to a CommCell Environment with PowerShell.
Syntax
Backup-CVSQLDatabase -Name String [-BackupType full | incremental | differential] [-Force] [-WhatIf] [-Confirm] [CommonParameters]Backup-CVSQLDatabase -Id int32 [-BackupType full | incremental | differential] [-Force] [-WhatIf] [-Confirm] [CommonParameters]Backup-CVSQLDatabase -DatabaseObject Object [-BackupType full | incremental | differential] [-Force] [-WhatIf] [-Confirm] [CommonParameters]Required Parameters
|
Parameter |
Description |
Data type |
Values |
Accepts pipeline input? |
Accepts wildcard characters? |
Type of parameter |
|---|---|---|---|---|---|---|
|
|
The name of the database. |
String |
No |
No |
Named |
|
|
|
The ID of the database. |
Int32 |
The default value is 0. |
No |
No |
Named |
|
|
The object that represents the database. |
Object |
Yes, by:
|
No |
Named |
Optional Parameters
Commvault Parameters
|
Parameter |
Description |
Data type |
Values |
Accepts pipeline input? |
Accepts wildcard characters? |
Type of parameter |
|---|---|---|---|---|---|---|
|
|
The type of backup to perform. |
String |
Valid values:
|
No |
No |
Named |
Microsoft PowerShell Parameters
You can use the following Microsoft PowerShell parameters:
-
Debug
-
ErrorAction
-
ErrorVariable
-
OutBuffer
-
OutVariable
-
PipelineVariable
-
Verbose
-
WarningAction
-
WarningVariable
-
Force
-
Confirm
-
WhatIf
Note
Only a few cmdlets support Force, Confirm, and WhatIf parameters.
For more information, see "About Common Parameters" in the Microsoft PowerShell documentation.
Input
This cmdlet does not support input.
Output
A message that indicates whether the backup was successful.
Examples
Back Up a Database Using the Name Parameter
The following example performs a backup for a database HistoryDB in your CommCell environment.
Backup-CVSQLDatabase -Name HistoryDB
Perform a Full Backup Job for a Database
The following example performs a full backup job for a database with ID 8 in your CommCell environment.
Backup-CVSQLDatabase -Id 8 -BackupType Full
Perform a Backup Using the Fully Qualified Client Name
The following example performs a backup for a database using the fully qualified client in your CommCell environment.
Get-CVSQLDatabase -Name HistoryDB -ClientName carbonwincs1 | Backup-CVSQLDatabase