SYNOPSIS
Sets Rubrik database properties
SYNTAX
Global (Default)
Copy Set-RubrikDatabase -id <String> [-SLAID <String>] [-SLA <String>] [-DisablePreBackupScript]
[-DisablePostBackupScript] [-LogBackupFrequencyInSeconds <Int32>] [-LogRetentionHours <Int32>] [-CopyOnly]
[-MaxDataStreams <Int32>] [-Server <String>] [-api <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
PostScript
Copy Set-RubrikDatabase -id <String> [-SLAID <String>] [-SLA <String>] [-DisablePreBackupScript]
-PostScriptPath <String> -PostScriptErrorAction <String> -PostTimeoutMs <Int32>
[-LogBackupFrequencyInSeconds <Int32>] [-LogRetentionHours <Int32>] [-CopyOnly] [-MaxDataStreams <Int32>]
[-Server <String>] [-api <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
PostScriptDisable
Copy Set-RubrikDatabase -id <String> [-SLAID <String>] [-SLA <String>] [-DisablePreBackupScript]
[-DisablePostBackupScript] [-LogBackupFrequencyInSeconds <Int32>] [-LogRetentionHours <Int32>] [-CopyOnly]
[-MaxDataStreams <Int32>] [-Server <String>] [-api <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
PreScriptDisable
Copy Set-RubrikDatabase -id <String> [-SLAID <String>] [-SLA <String>] [-DisablePreBackupScript]
[-DisablePostBackupScript] [-LogBackupFrequencyInSeconds <Int32>] [-LogRetentionHours <Int32>] [-CopyOnly]
[-MaxDataStreams <Int32>] [-Server <String>] [-api <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
PreScript
Copy Set-RubrikDatabase -id <String> [-SLAID <String>] [-SLA <String>] -PreScriptPath <String>
-PreScriptErrorAction <String> -PreTimeoutMs <Int32> [-DisablePostBackupScript]
[-LogBackupFrequencyInSeconds <Int32>] [-LogRetentionHours <Int32>] [-CopyOnly] [-MaxDataStreams <Int32>]
[-Server <String>] [-api <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
SLAbyName
Copy Set-RubrikDatabase -id <String> -SLA <String> [-DisablePreBackupScript] [-DisablePostBackupScript]
[-LogBackupFrequencyInSeconds <Int32>] [-LogRetentionHours <Int32>] [-CopyOnly] [-MaxDataStreams <Int32>]
[-Server <String>] [-api <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
SLAbyId
Copy Set-RubrikDatabase -id <String> -SLAID <String> [-DisablePreBackupScript] [-DisablePostBackupScript]
[-LogBackupFrequencyInSeconds <Int32>] [-LogRetentionHours <Int32>] [-CopyOnly] [-MaxDataStreams <Int32>]
[-Server <String>] [-api <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The Set-RubrikDatabase cmdlet is used to update certain settings for a Rubrik database.
EXAMPLES
EXAMPLE 1
Copy Set-RubrikDatabase -id MssqlDatabase:::c5ecf3ef-248d-4bb2-8fe1-4d3c820a0e38 -LogBackupFrequencyInSeconds 900
Set the target database's log backup interval to 15 minutes (900 seconds)
EXAMPLE 2
Copy Get-RubrikDatabase -HostName Foo -Instance MSSQLSERVER | Set-RubrikDatabase -SLA 'Silver' -CopyOnly
Set all databases on host FOO to use SLA Silver and be copy only.
EXAMPLE 3
Copy $RubrikDatabase = Get-RubrikDatabase -Hostname am1-sql16-1 -Instance MSSQLSERVER -Name "AthenaAM1-SQL16-1-2016"
Set-RubrikDatabase -id $RubrikDatabase.id -PreScriptPath "c:\temp\test.bat" -PreScriptErrorAction "continue" -PreTimeoutMs 300
Set a script to run before a Rubrik Backup runs against the database
EXAMPLE 4
Copy $RubrikDatabase = Get-RubrikDatabase -Hostname am1-sql16-1 -Instance MSSQLSERVER -Name "AthenaAM1-SQL16-1-2016"
Set-RubrikDatabase -id $RubrikDatabase.id -PostScriptPath "c:\temp\test.bat" -PostScriptErrorAction "continue" -PostTimeoutMs 300
Set a script to run after a Rubrik Backup runs against the database
EXAMPLE 5
Copy $RubrikDatabase = Get-RubrikDatabase -Hostname am1-sql16-1 -Instance MSSQLSERVER -Name "AthenaAM1-SQL16-1-2016"
Set-RubrikDatabase -id $RubrikDatabase.id -DisablePreBackupScript
Remove a script from running before a Rubrik Backup
EXAMPLE 6
Copy $RubrikDatabase = Get-RubrikDatabase -Hostname am1-sql16-1 -Instance MSSQLSERVER -Name "AthenaAM1-SQL16-1-2016"
Set-RubrikDatabase -id $RubrikDatabase.id -DisablePostBackupScript
Remove a script from running after a Rubrik Backup
EXAMPLE 7
Copy $RubrikDatabase = Get-RubrikDatabase -Hostname am1-sql16-1 -Instance MSSQLSERVER -Name "AthenaAM1-SQL16-1-2016"
Set-RubrikDatabase -id $RubrikDatabase.id -MaxDataStreams 3
Modifies the Max Data Streams allowed for a specified database
PARAMETERS
-id
Rubrik's database id value
Copy Type : String
Parameter Sets : (All)
Aliases :
Required : True
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-SLAID
SLA Domain ID for the database
Copy Type : String
Parameter Sets : Global, PostScript, PostScriptDisable, PreScriptDisable, PreScript
Aliases : ConfiguredSlaDomainId
Required : False
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
Copy Type : String
Parameter Sets : SLAbyId
Aliases : ConfiguredSlaDomainId
Required : True
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-SLA
The SLA Domain name in Rubrik
Copy Type : String
Parameter Sets : Global, PostScript, PostScriptDisable, PreScriptDisable, PreScript
Aliases :
Required : False
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
Copy Type : String
Parameter Sets : SLAbyName
Aliases :
Required : True
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-PreScriptPath
Pre-backup script parameters
Copy Type : String
Parameter Sets : PreScript
Aliases :
Required : True
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-PreScriptErrorAction
Copy Type : String
Parameter Sets : PreScript
Aliases :
Required : True
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-PreTimeoutMs
Copy Type : Int32
Parameter Sets : PreScript
Aliases :
Required : True
Position : Named
Default value : 0
Accept pipeline input : False
Accept wildcard characters : False
-DisablePreBackupScript
Copy Type : SwitchParameter
Parameter Sets : Global, PostScript, PostScriptDisable, SLAbyName, SLAbyId
Aliases :
Required : False
Position : Named
Default value : False
Accept pipeline input : False
Accept wildcard characters : False
Copy Type : SwitchParameter
Parameter Sets : PreScriptDisable
Aliases :
Required : True
Position : Named
Default value : False
Accept pipeline input : False
Accept wildcard characters : False
-PostScriptPath
Post-backup script parameters
Copy Type : String
Parameter Sets : PostScript
Aliases :
Required : True
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-PostScriptErrorAction
Copy Type : String
Parameter Sets : PostScript
Aliases :
Required : True
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-PostTimeoutMs
Copy Type : Int32
Parameter Sets : PostScript
Aliases :
Required : True
Position : Named
Default value : 0
Accept pipeline input : False
Accept wildcard characters : False
-DisablePostBackupScript
Copy Type : SwitchParameter
Parameter Sets : Global, PreScriptDisable, PreScript, SLAbyName, SLAbyId
Aliases :
Required : False
Position : Named
Default value : False
Accept pipeline input : False
Accept wildcard characters : False
Copy Type : SwitchParameter
Parameter Sets : PostScriptDisable
Aliases :
Required : True
Position : Named
Default value : False
Accept pipeline input : False
Accept wildcard characters : False
-LogBackupFrequencyInSeconds
Number of seconds between log backups if db is in FULL or BULK_LOGGED NOTE: Default of -1 is used to get around ints defaulting as 0
Copy Type : Int32
Parameter Sets : (All)
Aliases :
Required : False
Position : Named
Default value : -1
Accept pipeline input : False
Accept wildcard characters : False
-LogRetentionHours
Number of hours backups will be retained in Rubrik NOTE: Default of -1 is used to get around ints defaulting as 0
Copy Type : Int32
Parameter Sets : (All)
Aliases :
Required : False
Position : Named
Default value : -1
Accept pipeline input : False
Accept wildcard characters : False
-CopyOnly
Boolean declaration for copy only backups on the database.
Copy Type : SwitchParameter
Parameter Sets : (All)
Aliases :
Required : False
Position : Named
Default value : False
Accept pipeline input : False
Accept wildcard characters : False
-MaxDataStreams
Number of max data streams Rubrik will use to back up the database NOTE: Default of -1 is used to get around ints defaulting as 0
Copy Type : Int32
Parameter Sets : (All)
Aliases :
Required : False
Position : Named
Default value : -1
Accept pipeline input : False
Accept wildcard characters : False
-Server
Rubrik server IP or FQDN
Copy Type : String
Parameter Sets : (All)
Aliases :
Required : False
Position : Named
Default value : $global:RubrikConnection.server
Accept pipeline input : False
Accept wildcard characters : False
-api
API version
Copy Type : String
Parameter Sets : (All)
Aliases :
Required : False
Position : Named
Default value : $global:RubrikConnection.api
Accept pipeline input : False
Accept wildcard characters : False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Copy Type : SwitchParameter
Parameter Sets : (All)
Aliases : wi
Required : False
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
-Confirm
Prompts you for confirmation before running the cmdlet.
Copy Type : SwitchParameter
Parameter Sets : (All)
Aliases : cf
Required : False
Position : Named
Default value : None
Accept pipeline input : False
Accept wildcard characters : False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters .
INPUTS
OUTPUTS
NOTES
Written by Mike Fal for community usage Twitter: @Mike_Fal GitHub: MikeFal
RELATED LINKS
https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/set-rubrikdatabase