Add scheduled task XML
This commit is contained in:
BIN
Update Rubrik.xml
Normal file
BIN
Update Rubrik.xml
Normal file
Binary file not shown.
@@ -1,7 +1,13 @@
|
|||||||
|
#
|
||||||
|
# backup.ps1
|
||||||
|
#
|
||||||
|
# TODO: Update cleanup time based on backup type
|
||||||
|
|
||||||
|
|
||||||
$sqlInstance = "sqlfcsql\TESTINST"
|
$sqlInstance = "sqlfcsql\TESTINST"
|
||||||
#$directory = "H:\Backup"
|
#$directory = "H:\Backup"
|
||||||
$directory = "C:\Rubrik\mount"
|
$directory = "C:\Rubrik\mount"
|
||||||
$fullBackupDay = 'Wednesday'
|
$fullBackupDay = 'Tuesday'
|
||||||
$cleanupTime = 24
|
$cleanupTime = 24
|
||||||
$checkCluster = $false
|
$checkCluster = $false
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
#
|
#
|
||||||
# On Demand Snapshot for all Oracle DBs with a specific SLA
|
# Update an SLA MV to point to the local host
|
||||||
# Created by Rubrik PS for McDermott, September 2025
|
# Created by Rubrik PS for ZF, September 2025
|
||||||
#
|
#
|
||||||
# Must be run with a Global service account.
|
# Must be run with a Global service account.
|
||||||
#
|
#
|
||||||
# Requires RubrikSecurityCloud module to be installed and working with
|
# Requires RubrikSecurityCloud module to be installed and working with
|
||||||
# a Global Service Account with the following rights:
|
# a Global Service Account with the following rights (TBC)
|
||||||
#
|
|
||||||
# - Data Management / Oracle / On-Demand Snapshot
|
|
||||||
# - Data Management / SLAs / Both Source and Target SLAs
|
|
||||||
#
|
#
|
||||||
# Create the service account file with:
|
# Create the service account file with:
|
||||||
# Set-RscServiceAccountFile sa.json -OutputFilePath Global.xml
|
# Set-RscServiceAccountFile sa.json -OutputFilePath Global.xml
|
||||||
#
|
#
|
||||||
# Example invocation
|
# Example invocation
|
||||||
# .\monthlySnap.ps1 -sourceSla "Prod Oracle SLA" -triggerSla "Oracle Monthly Only"
|
# .\claimInstance.ps1 -sqlInstance "sqlfcsql\TESTINST" -mvName "JP-ZF-SQL"
|
||||||
#
|
#
|
||||||
# v0.1 Initial Release
|
# v0.1 Initial Release
|
||||||
#
|
#
|
||||||
@@ -24,7 +21,7 @@
|
|||||||
param (
|
param (
|
||||||
[Parameter(Mandatory=$False,
|
[Parameter(Mandatory=$False,
|
||||||
HelpMessage="Instance to claim")]
|
HelpMessage="Instance to claim")]
|
||||||
[string]$sourceSla,
|
[string]$sqlInstance,
|
||||||
|
|
||||||
[Parameter(Mandatory=$False,
|
[Parameter(Mandatory=$False,
|
||||||
HelpMessage="Do not change the MV")]
|
HelpMessage="Do not change the MV")]
|
||||||
@@ -47,7 +44,7 @@ $ErrorActionPreference = 'Stop'
|
|||||||
function Write-Log($message) {
|
function Write-Log($message) {
|
||||||
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||||
$logEntry = "$timestamp $message"
|
$logEntry = "$timestamp $message"
|
||||||
Add-Content -Path "C:\Rubrik\monthlySnap.log" -Value $logEntry
|
Add-Content -Path $logFile -Value $logEntry
|
||||||
Write-Host $logEntry
|
Write-Host $logEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +100,7 @@ if ($myHost.Id -ne $mvDetail.hostDetail.Id) {
|
|||||||
$query.Var.input.Id = $mvDetail.Id
|
$query.Var.input.Id = $mvDetail.Id
|
||||||
$query.Var.input.update.Name = $mvName
|
$query.Var.input.update.Name = $mvName
|
||||||
$query.Var.input.update.config.SmbDomainName = $mvDetail.SmbShare.DomainName
|
$query.Var.input.update.config.SmbDomainName = $mvDetail.SmbShare.DomainName
|
||||||
$query.Var.input.update.config.SmbValidIps = $mvDetail.SmbShare.ValidIps
|
$query.Var.input.update.config.SmbValidIps = $myHost.Name
|
||||||
$query.Var.input.update.config.SmbValidUsers = $mvDetail.SmbShare.ValidUsers + $mvDetail.SmbShare.ActiveDirectoryGroups
|
$query.Var.input.update.config.SmbValidUsers = $mvDetail.SmbShare.ValidUsers + $mvDetail.SmbShare.ActiveDirectoryGroups
|
||||||
$query.Var.input.update.slaClientConfig.clientHostId = $myHost.Id
|
$query.Var.input.update.slaClientConfig.clientHostId = $myHost.Id
|
||||||
$query.Var.input.update.slaClientConfig.channelHostMountPaths = $mvDetail.ClientConfig.ChannelHostMountPaths
|
$query.Var.input.update.slaClientConfig.channelHostMountPaths = $mvDetail.ClientConfig.ChannelHostMountPaths
|
||||||
|
|||||||
2
failover.cmd
Normal file
2
failover.cmd
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
@echo off
|
||||||
|
"C:\Program Files\PowerShell\7\pwsh.exe" -ExecutionPolicy Bypass -File "%~dp0claimInstance.ps1"
|
||||||
Reference in New Issue
Block a user