Commvault / CVPowershellSDK

Developer SDK - Powershell
12 stars 12 forks source link

Backup-CVSQLDatabase Copy Only parameter #46

Closed cpuppos closed 7 months ago

cpuppos commented 9 months ago

Commvault,

It would be great to have the ability with Backup-CVSQLDatabase to do a "Copy only" backup. If this is already possible, can you please provide the syntax?

JnaneshD05 commented 9 months ago

Hi, Will check this internally and get back.

cpuppos commented 9 months ago

Hi, Will check this internally and get back.

Any update on this?

JnaneshD05 commented 9 months ago

Hey Sorry missed this! We have found a way. I will submit a request by today

cpuppos commented 9 months ago

thanks @JnaneshD05 !

please keep me posted on when it is released.

cpuppos commented 7 months ago

@JnaneshD05 Any updates on this?

JnaneshD05 commented 7 months ago

This should be working now. Uninstall and Install the SDK again.

cpuppos commented 5 months ago

@JnaneshD05 I do not see any new switches listed for the copy only backup

PS C:\Users\cpuppos> Get-Help -Name Backup-CVSQLDatabase -full

NAME Backup-CVSQLDatabase

SYNOPSIS Method to submit backup job for specific SQL database.

SYNTAX Backup-CVSQLDatabase -Name [-BackupType {full | incremental | differential}] [-Force] [-WhatIf] [-Confirm] []

Backup-CVSQLDatabase [-BackupType {full | incremental | differential}] [-Force] -Id <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]

Backup-CVSQLDatabase [-BackupType {full | incremental | differential}] [-Force] -DatabaseObject <Object> [-WhatIf] [-Confirm]
[<CommonParameters>]

DESCRIPTION Method to submit backup job for specific SQL database.

PARAMETERS -Name Specify the database by Name.

    Required?                    true
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-BackupType
    The BackupType: full, incremental (default), differential.

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Force [<SwitchParameter>]
    Switch to Force override of default 'WhatIf' confirmation behavior.

    Required?                    false
    Position?                    named
    Default value                False
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Id <Int32>
    Specify the database by Id.

    Required?                    true
    Position?                    named
    Default value                0
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DatabaseObject <Object>
    Specify the database by piped DatabaseObject.

    Required?                    true
    Position?                    named
    Default value
    Accept pipeline input?       true (ByValue, ByPropertyName)
    Accept wildcard characters?  false

-WhatIf [<SwitchParameter>]

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Confirm [<SwitchParameter>]

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

<CommonParameters>
    This cmdlet supports the common parameters: Verbose, Debug,
    ErrorAction, ErrorVariable, WarningAction, WarningVariable,
    OutBuffer, PipelineVariable, and OutVariable. For more information, see
    about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS System.Object

OUTPUTS System.Management.Automation.PSObject

-------------------------- EXAMPLE 1 --------------------------

PS C:\>{{ Add code here }}

{{ Add output here }}

-------------------------- EXAMPLE 2 --------------------------

PS C:\>{{ Add code here }}

{{ Add output here }}

RELATED LINKS https://docs.microsoft.com/en-us/powershell/module/commvaultpowershell/backup-cvsqldatabase

PS C:\Users\cpuppos>

JnaneshD05 commented 5 months ago

Okay, I guess it is not added to the SDkV2 ..I will add it

cpuppos commented 5 months ago

@JnaneshD05 Whats the best one to be using? The documentation is a little confusing.

JnaneshD05 commented 5 months ago

You can use the V2. Since the issue was opened here I fixed it in this repo assuming u are using this.. I will be releasing the next version in v2 with the fixes that were added here.

JnaneshD05 commented 5 months ago

Please install the latest version and you should be able to find the copyOnly parameter. Even Connect-CVServer is now added in the v2 SDK.